Threat reportVulnerabilityTL-2026-0900
pgAdmin 4 v9.16 Patches 7 Vulnerabilities (CVE-2026-12044 to CVE-2026-12050): SQLi, AI-Assistant Read-Only Bypass to RCE, Auth Bypass with Pickle Deserialization, Stored XSS
pgAdmin 4 v9.16 fixes seven vulnerabilities (CVE-2026-12044 through CVE-2026-12050) in the widely deployed PostgreSQL administration tool. The most severe is an AI Assistant read-only transaction bypass (CVE-2026-12045) that lets prompt-injected multi-statement SQL escape the READ ONLY wrapper and chain to OS command execution via COPY ...
Key facts
| Identifiers | TL-2026-0900, CVE-2026-12044, CVE-2026-12045, CVE-2026-12046, CVE-2026-12047, CVE-2026-12048, CVE-2026-12049, CVE-2026-12050 |
|---|---|
| Severity | HIGH |
| CVSS | 9 (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H) |
| EPSS | CVE-2026-12046: 1.0% (62.8th percentile); CVE-2026-12045: 0.6% (49.9th percentile); CVE-2026-12050: 0.4% (34.9th percentile) |
| Affected products | pgAdmin Development Team (PostgreSQL Global Development Group) pgAdmin 4 |
| Weaknesses (CWE) | CWE-89, CWE-79, CWE-80, CWE-502, CWE-306, CWE-601, CWE-78, CWE-863, CWE-1427, CWE-94 |
| Tools | pgAdmin AI Assistant |
| MITRE ATT&CK techniques | T1059 Command and Scripting Interpreter, T1059.004 Unix Shell, T1059.007 JavaScript, T1068 Exploitation for Privilege Escalation, T1078 Valid Accounts, T1102 Web Service, T1185 Browser Session Hijacking, T1190 Exploit Public-Facing Application, T1204.001 Malicious Link, T1211 Exploitation for Stealth, T1212 Exploitation for Credential Access, T1213 Data from Information Repositories and 7 more in the attack flow |
| Motivation | UNKNOWN |
| Target sectors | technology, financial, government, healthcare, enterprise IT / database administration |
| Target regions | Global |
| Detection rules | 9 (1 shown free) |
| Sources | 6 cited sources |
Detection coverage
As of 2026-06-22, Threadlinqs Intelligence publishes 9 detection rule(s) for TL-2026-0900 across Splunk SPL, Microsoft KQL and Sigma, covering 22 indicator(s) of compromise. The whole corpus is readable without an account. Every threat comes with one complete detection in Splunk SPL, Microsoft KQL and Sigma, free for everyone; a free account adds daily TL Creds to unlock the rest. Paid plans add a larger daily allowance, correlation and the MCP server. Threadlinqs MCP server · View plans.
Free detection: pgAdmin/Python Backend Spawns OS Shell via COPY ... TO PROGRAM (AI Assistant READ ONLY Bypass RCE) — Exploitation
Detects the CVE-2026-12045 RCE chain where a prompt-injected multi-statement query commits outside the AI Assistant READ ONLY guardrail and executes OS commands via PostgreSQL COPY ... TO PROGRAM on a superuser connection. Telemetry signature: the pgAdmin Python backend (python.exe / pythonw.exe) spawning cmd.exe, powershell.exe, /bin/sh, or /bin/bash. A database-administration tool backend should essentially never be the parent of an interactive OS shell, so this is high-fidelity for the exploitation phase.
- Languages: Splunk SPL, Microsoft KQL, Sigma
- ATT&CK: T1190, T1059, T1059.004, T1059.001
- Data sources: sysmon, windows_security, edr_process_events
- Severity: critical
- Confidence: high
Splunk SPL
index=sysmon sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1
| where (like(ParentImage, "%\\python.exe") OR like(ParentImage, "%\\pythonw.exe") OR match(ParentImage, "(?i)pgadmin"))
| where (like(Image, "%\\cmd.exe") OR like(Image, "%\\powershell.exe") OR like(Image, "%\\pwsh.exe") OR like(Image, "%\\bash.exe") OR like(Image, "%\\sh.exe"))
| eval suspicious_copy=if(match(CommandLine, "(?i)(COPY|TO PROGRAM|copy_to_program_marker)"),1,0)
| stats count min(_time) as firstSeen max(_time) as lastSeen values(CommandLine) as childCmdLines values(User) as users by host ParentImage Image
| where count > 0
| convert ctime(firstSeen) ctime(lastSeen)
| sort - countMicrosoft KQL
DeviceProcessEvents
| where Timestamp > ago(24h)
| where InitiatingProcessFileName in~ ("python.exe", "pythonw.exe") or InitiatingProcessFolderPath has "pgadmin"
| where FileName in~ ("cmd.exe", "powershell.exe", "pwsh.exe", "bash.exe", "sh.exe")
| extend CopyToProgram = iif(ProcessCommandLine has_any ("TO PROGRAM", "COPY", "copy_to_program_marker"), true, false)
| project Timestamp, DeviceName, AccountName, InitiatingProcessFileName, InitiatingProcessCommandLine, FileName, ProcessCommandLine, CopyToProgram
| order by Timestamp descSigma
title: pgAdmin Python Backend Spawns OS Shell (CVE-2026-12045 COPY TO PROGRAM RCE)
id: 7f3a1c2e-0900-4a01-9b11-aa45e1d09001
status: experimental
description: Detects the pgAdmin Python backend spawning an OS shell, consistent with the AI Assistant READ ONLY transaction bypass chaining to COPY ... TO PROGRAM command execution on a superuser PostgreSQL connection.
references:
- https://www.pgadmin.org/docs/pgadmin4/latest/release_notes_9_16.html
- https://attack.mitre.org/techniques/T1190/
author: Threadlinqs Team
date: 2026/06/22
tags:
- attack.initial_access
- attack.execution
- attack.t1190
- attack.t1059
- attack.t1059.004
- cve.2026.12045
logsource:
category: process_creation
product: windows
detection:
selection:
ParentImage|endswith: '\python.exe'
Image|endswith:
- '\cmd.exe'
- '\powershell.exe'
- '\pwsh.exe'
- '\bash.exe'
condition: selection
falsepositives:
- Legitimate pgAdmin maintenance scripts or operators using an embedded terminal feature
- Python-based automation that intentionally shells out on the pgAdmin host
level: highKnown false positives:
- Legitimate pgAdmin maintenance scripts that invoke a shell
- Operator-initiated COPY ... TO PROGRAM jobs on trusted superuser connections
- Python automation co-located on the pgAdmin host that shells out
Tuning notes: Baseline the pgAdmin host's normal process tree and exclude known administrative automation accounts. Raise priority when the child command line contains 'TO PROGRAM' or when the parent connection is superuser. Tighten ParentImage to the exact pgAdmin Python interpreter path in your deployment to reduce noise.
- AI Assistant READ ONLY Bypass — Multi-Statement COMMIT then COPY TO PROGRAM — Exploitation · unlock with TL Creds
- pgAdmin Server-Mode Pickle Deserialization Sink Reached Unauthenticated — Post-Exploitation · unlock with TL Creds
- pgAdmin MFA Open Redirect to External Host (next Parameter Abuse) — C2 / Lateral · unlock with TL Creds
- Database-Tool Backend Spawns Shell — COPY TO PROGRAM Execution Signature — Exploitation · unlock with TL Creds
- pgAdmin Dialog Template SQL Injection — COMMENT ON / Restore Point Literal Break-Out — Post-Exploitation · unlock with TL Creds
- Stored XSS / HTML Injection Markers in pgAdmin Server Error & EXPLAIN Content — C2 / Lateral · unlock with TL Creds
- Unauthenticated POST to pgAdmin SQL Editor Deserialization Endpoints (close / update_connection) — Post-Exploitation · unlock with TL Creds
- pgAdmin Stored XSS Saved-Credential Exfiltration Beacon — C2 / Exfiltration · unlock with TL Creds
Indicators of compromise
As of 2026-06-22, Threadlinqs Intelligence tracks 22 indicators of compromise for TL-2026-0900.
Technical analysis
TO PROGRAM on a superuser connection. The release also addresses SQL injection across sixteen dialog templates, an authentication bypass exposing a pickle deserialization sink, a critical stored XSS that can exfiltrate saved server credentials, HTML injection, an MFA open redirect, and a second SQLi in the named restore point endpoint.
On June 18-19, 2026 the pgAdmin Development Team (under the PostgreSQL Global Development Group) released pgAdmin 4 v9.16, bundling 64 bug fixes with patches for seven security vulnerabilities tracked as CVE-2026-12044 through CVE-2026-12050. pgAdmin 4 is the most popular open-source administration and development platform for PostgreSQL, deployed both as a desktop application and in multi-user 'server mode' web deployments inside enterprises and cloud environments, which broadens the attack surface for several of these issues.
CVE-2026-12044 (SQL injection, CVSS ~8.8 HIGH) affected sixteen dialog templates that rendered COMMENT ON ... IS '<description>' statements. Object names or descriptions containing apostrophes or crafted input broke out of the string literal, allowing injection. The fix migrates the affected templates to qtLiteral() for safe quoting and rewrites statistics calls to pass the relation OID via a ::oid::regclass cast instead of interpolating identifiers.
CVE-2026-12045 (AI Assistant read-only transaction bypass to RCE, CVSS ~9.0 CRITICAL) is the highest-impact issue. The AI Assistant feature wrapped generated queries in a READ ONLY transaction as a guardrail, but prompt-injected multi-statement payloads could commit outside that wrapper and execute arbitrary SQL. On a connection running with superuser privileges this chains to operating-system command execution through PostgreSQL's COPY ... TO PROGRAM functionality. Because the assistant can be steered by content it reads from the database, an attacker who can influence database content (rows, object comments, error text) can manipulate the assistant into executing write/exec operations the operator never intended.
CVE-2026-12046 (authentication bypass / unsafe deserialization) is an access-control failure in server mode: two SQL Editor endpoints were missing the @pga_login_required decorator, leaving a pickle deserialization sink reachable without authentication. Unauthenticated access to a Python pickle deserialization path is a classic remote-code-execution risk. The fix enforces login validation on all affected endpoints.
CVE-2026-12047 (HTML injection) occurs in the cloud-deployment modules (Amazon RDS, Microsoft Azure, Google Cloud) where SDK exception text was rendered unsanitized through html-react-parser, allowing markup injection into the browser DOM.
CVE-2026-12048 (critical stored XSS) is the broadest client-side issue: PostgreSQL server error text and EXPLAIN plan-node content were passed unsanitized through html-react-parser across notifier toasts, form errors, modal alerts, and the Explain visualizer. A malicious server, or attacker-controlled query plan/error text, could execute script in the pgAdmin operator's session, exfiltrate saved server credentials, and issue SQL against any connected server.
CVE-2026-12049 (open redirect) is an unvalidated 'next' parameter in the multi-factor authentication flow that can redirect a user to an attacker-chosen URL, useful for phishing and credential-harvesting pretexts.
CVE-2026-12050 (SQL injection) is in the named restore point endpoint, where the user-supplied restore point name was interpolated into SQL via str.format() instead of bound parameters; the fix uses parameterized queries.
There is no public reporting of in-the-wild exploitation at disclosure, and no published proof-of-concept exploit; the mechanics are documented in the vendor release notes and security press. The dominant risk profile is privileged-but-authenticated misuse (AI Assistant, SQLi, restore point), malicious-server / hostile-content attacks (stored XSS, HTML injection), and an unauthenticated server-mode deserialization sink (CVE-2026-12046). Enterprises running shared server-mode pgAdmin should treat CVE-2026-12045 and CVE-2026-12046 as priority and upgrade to v9.16 immediately.
MITRE ATT&CK techniques by tactic:
Execution
T1059 Command and Scripting Interpreter; T1059.004 Unix Shell; T1059.007 JavaScript; T1204.001 Malicious Link
Privilege Escalation
T1068 Exploitation for Privilege Escalation; T1078 Valid Accounts; T1548 Abuse Elevation Control Mechanism
Command and Control
Collection
T1185 Browser Session Hijacking; T1213 Data from Information Repositories
Initial Access
T1190 Exploit Public-Facing Application; T1566 Phishing
Defense Evasion
T1211 Exploitation for Stealth
Credential Access
T1212 Exploitation for Credential Access; T1539 Steal Web Session Cookie; T1552.001 Credentials In Files
Impact
T1565.001 Stored Data Manipulation
Exfiltration
T1567 Exfiltration Over Web Service
defense-impairment
Remediation
Patches
- pgAdmin 4 v9.16 (issues #10078, #10022, #10072, #10069, #10068, #10028, #10026)
Immediate actions
- Upgrade all pgAdmin 4 deployments to v9.16 or later; this is the only complete fix for all seven CVEs.
- Prioritize multi-user server-mode web deployments, which are exposed to the unauthenticated pickle deserialization sink (CVE-2026-12046) and stored XSS (CVE-2026-12048).
- Until patched, restrict the AI Assistant feature and avoid using it against connections that hold superuser privileges (mitigates CVE-2026-12045 RCE chain).
Workarounds
- Disable the AI Assistant integration where it is not required.
- Avoid connecting pgAdmin to untrusted/hostile PostgreSQL servers, which could deliver malicious error text or EXPLAIN content (CVE-2026-12048 / CVE-2026-12047).
- Restrict access to server-mode pgAdmin endpoints to authenticated, trusted users only.
Longer-term hardening
- Run pgAdmin database connections with least-privilege roles rather than superuser to break the COPY ... TO PROGRAM RCE chain.
- Place server-mode pgAdmin behind authenticated reverse proxies / network segmentation and never expose it directly to the internet.
- Disable or strictly control COPY ... TO PROGRAM at the PostgreSQL layer (limit to trusted superusers; consider revoking pg_execute_server_program).
Affected and fixed versions
- pgAdmin Development Team (PostgreSQL Global Development Group) — pgAdmin 4
Vulnerable versions: < 9.16 (versions prior to 9.16, desktop and server/web mode)
Fixed in: 9.16
Timeline
- v9.16 also removed the administrator-role bypass from the server-access helpers (issue #9933) so the access-control checks added in v9.15 for CVE-2026-7813 are now enforced uniformly, closing a prior server-mode authorization gap.
- pgAdmin 4 v9.16 release notes published, documenting fixes for CVE-2026-12044 through CVE-2026-12050 (issues #10078, #10022, #10072, #10069, #10068, #10028, #10026) alongside 64 bug fixes.
- The seven vulnerabilities were responsibly disclosed to the pgAdmin Development Team by external researchers credited in the release notes: Jasser Chebbi (CVE-2026-12044), Isaac Chen (CVE-2026-12045), Fernando Bortotti (CVE-2026-12046/12047/12048), Mai Pham Hien (CVE-2026-12049), and Geo (CVE-2026-12050).
- The PostgreSQL Global Development Group published the official pgAdmin 4 v9.16 release announcement on postgresql.org, the authoritative fixed-version reference.
- No public proof-of-concept exploit and no reports of in-the-wild exploitation at time of disclosure; risk profile is privileged misuse, hostile-server content, and an unauthenticated server-mode deserialization sink.
- pgAdmin 4 v9.16 available for download as the remediation for all seven vulnerabilities; upgrade recommended for enterprise/server-mode deployments.
- CVE identifiers CVE-2026-12044 through CVE-2026-12050 assigned and associated with pgAdmin 4 versions prior to 9.16.
- Security press (Cyber Security News, Cyberpress, SecureReading) reported the seven CVEs, detailing the AI Assistant read-only bypass to RCE via COPY ... TO PROGRAM and the critical stored XSS.
Sources cited
- pgAdmin 4 v9.16 Released (official PostgreSQL news) postgresql.org · Vendor report · 2026-06-19
- pgAdmin 4 v9.16 Release Notes pgadmin.org · Vendor report · 2026-06-18
- pgAdmin Development Team News Archive pgadmin.org · Vendor report · 2026-06-18
- pgAdmin 4 Released With Fix for 7 Vulnerabilities cybersecuritynews.com · News · 2026-06-22
- New pgAdmin 4 Version Patches Seven Security Flaws and Adds Features cyberpress.org · News · 2026-06-22
- pgAdmin 4 vulnerabilities securereading.com · News · 2026-06-22
Previous and next in vulnerability
- Google Chrome 149 Multiple Memory-Corruption Vulnerabilities Enable Arbitrary Code Execution (CVE-2026-12437 through CVE-2026-12469) Previous report
- QNAP QSA-26-10: Multiple Injection and Memory-Safety Vulnerabilities in QTS, QuTS hero, QuTS cloud, QVP, and File Station (CVE-2025-66273, CVE-2026-26240, and 12 others) Next report
Drafted by the Threadlinqs research pipeline from 6 sources; published ; last updated —.