Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate to pgAdmin with Import/Export role
-
DeliverySet standard_conforming_strings off for session
-
ExploitSubmit crafted double-quoted identifier query
-
ExecutionDesync parens check and inject TO PROGRAM
-
ImpactExecute OS command as pgAdmin host account
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK
2 techniques across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires an authenticated pgAdmin session whose database role holds the Import/Export Data permission - granted to non-administrators by default - and the attacker must set standard_conforming_strings=off for their own session (which any ordinary role may do). The attacker then uses the Import/Export Data tool with a query containing a backslash before a double quote inside a double-quoted identifier, so psql under scs=off treats the backslash-escaped quote as not closing the identifier while pgAdmin's validator does, exposing a closing parenthesis that ends the \copy (...) wrapper and allowing an appended TO PROGRAM clause. Limiting factors: affects only pgAdmin 4 versions before 9.19; needs a valid low-privileged account with the Import/Export feature; and the injected command runs with the privileges of the OS account hosting pgAdmin. No special non-default server configuration is otherwise needed because the scs=off toggle is attacker-controlled. |
| Impact | This is a genuine high-priority issue, not an inflated high-CVSS score. The supplied CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:N) with high vulnerable-system impact (VC/VI/VA:H) and high subsequent-system impact (SC/SI/SA:H) describes authenticated network-reachable OS command execution on the pgAdmin host, which is consistent with CWE-78 and the described TO PROGRAM injection. The vuln.today Decision label is act_now, reinforcing urgency. The one mitigating signal is PR:L - exploitation requires an authenticated pgAdmin/PostgreSQL session rather than fully unauthenticated access - but this barrier is weak because the Import/Export Data permission is granted to non-administrators by default and any ordinary role can set standard_conforming_strings=off for itself, so the privilege prerequisite is effectively any legitimate low-privileged user. No EPSS score and no CISA KEV status were provided in the input, and there is no indication of active exploitation in the wild; the available exploitation evidence is a public regression test in the fix commit that contains a working trigger payload. In short: real and serious because it yields host RCE with only default low-privilege access, but current signals point to a patch-driven disclosure rather than confirmed mass exploitation. Note the privilege requirement (PR:L) means this should not be described as remote-unauthenticated. |
| Exploit ScenarioDerived | A low-privileged user with the default Import/Export Data permission sets standard_conforming_strings=off on their own session, then submits an export query containing a backslash-escaped double quote inside a double-quoted identifier. pgAdmin's parentheses-balance check and psql's \copy parser then disagree about where the identifier ends, letting a hidden closing parenthesis terminate the \copy (...) wrapper and a trailing TO PROGRAM clause execute an arbitrary OS command on the pgAdmin host as the account running pgAdmin. No standalone weaponized exploit is confirmed, but the fix commit's regression test includes a working payload (SELECT "a\"b"c) TO PROGRAM 'echo pwned' x"). |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 30, 2026
Command injection in pgAdmin 4 before 9.19 lets an authenticated, low-privileged database user execute arbitrary operating-system commands on the pgAdmin host by abusing the Import/Export Data tool's query export. The tool wraps the user-supplied query in a psql \copy (...) TO command and validates parenthesis balance, but a backslash inside a double-quoted identifier makes pgAdmin's validator and psql's parser disagree about where the identifier ends, so a hidden closing parenthesis terminates the wrapper and an appended TO PROGRAM clause is executed by psql as the OS account running pgAdmin before the server rejects the statement. This is a bypass of the fix for CVE-2026-17566; the Import/Export Data permission is granted to non-administrators by default and any ordinary role can set standard_conforming_strings=off for its own session, so no privileged database access is required. No public exploit code has been identified at time of analysis, but the vendor fix is available in pgAdmin 4 9.19 and the priority assessment is act_now.
RemediationAI
Upgrade pgAdmin 4 to version 9.19 or later, which contains the fix at commit 9be31a019f780647fb689c458408c8803263c812 and rejects any backslash inside a double-quoted identifier as well as inside single-quoted strings; see https://github.com/pgadmin-org/pgadmin4/issues/10663 for the vendor issue. If upgrading immediately is not possible, the key prerequisite can be removed: revoke the Import/Export Data permission from non-administrator roles and limit the tool to trusted administrators, at the cost of removing bulk data import/export for ordinary users. Because the injected command runs as the operating-system account hosting pgAdmin, run pgAdmin under a dedicated low-privileged account or container that holds no credentials or filesystem access beyond what pgAdmin itself needs, and restrict who can reach the pgAdmin service so that untrusted parties cannot obtain an authenticated session - trade-off is reduced convenience for shared deployments. Since the underlying divergence depends on the session's standard_conforming_strings setting, which the attacker controls, server-side scs configuration hardening is not a reliable mitigation on its own and updating remains the complete fix.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
pgAdmin's Import/Export Data feature shells out to psql for query-based exports, embedding the user's query inside a \copy (...) TO ... wrapper and validating the query with a Python parenthesis-balance check in web/pgadmin/tools/import_export/__init__.py. That check follows PostgreSQL identifier and string quoting rules, but psql's own tokenizer (strtokx) takes its escape character from the session's standard_conforming_strings (scs) setting and applies it to whichever quote character opened the current token. The earlier CVE-2026-17566 fix closed this divergence for single-quoted strings by rejecting any backslash found inside them; it did not do the same for double-quoted identifiers, where the parallel ambiguity remained. With scs=off, a backslash-escaped double quote inside an identifier does not close that identifier from psql's point of view, while pgAdmin's validator treats it as a closing quote and believes the following ')' is inside a quoted token. A real closing parenthesis is therefore exposed, psql ends the \copy (...) context early and honours a subsequent TO PROGRAM clause, and psql popen()s the attacker's command with the privileges of the operating-system account running pgAdmin - all before the backend rejects the malformed SQL. This is CWE-78 (OS command injection) with an argument-injection root cause in quoting-state desynchronisation between two parsers. The supplied commit 9be31a019f780647fb689c458408c8803263c812 fixes it by rejecting any backslash inside a double-quoted identifier, matching the existing treatment of single-quoted strings, rather than attempting to guess the server's scs setting, plus regression tests covering the scs=off backslash-quote identifier bypass and legitimate doubled-quote identifiers.
Know when Pgadmin gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
Network-reachable tool exploitable by any default low-privileged Import/Export role (PR:L, AC:L); command executes on the host OS beyond the database component (S:C) with full C/I/A impact.
Primary rating from Vendor (f86ef6dc-4d3a-42ad-8f28-e6d5547a5007).
CVSS VectorVendor: f86ef6dc-4d3a-42ad-8f28-e6d5547a5007
Lifecycle Timeline
2DescriptionCVE.org
pgAdmin 4's Import/Export Data tool wraps a user's query export in a psql \copy (...) TO command and checks that the query's parentheses are balanced so that nothing can escape the wrapper. The check rejected a backslash inside a single-quoted string, but not inside a double-quoted identifier, where it treated the next double quote as closing the identifier. psql's \copy parser applies the connection's escape character to whichever quote opened a token, so with standard_conforming_strings off a backslash-escaped double quote does not close the identifier. pgAdmin's and psql's view of the quoting then diverged, a closing parenthesis hidden from the check ended the \copy (...) wrapper, and a following TO PROGRAM clause was executed by psql on the pgAdmin host, as the operating-system account running pgAdmin, before the server rejected the statement. An ordinary database role can turn standard_conforming_strings off for itself, and the Import/Export Data permission is granted to non-administrators by default.
This is a bypass of the fix for CVE-2026-17566. The fix rejects any backslash inside a double-quoted identifier, as was already done for single-quoted strings, since its meaning depends on a server setting that cannot be known reliably when the query is validated.
This issue affects pgAdmin 4: before 9.19.
Executive ViewAI
A critical command injection vulnerability in pgAdmin 4 (before version 9.19) allows any authenticated low-privileged database user to execute arbitrary operating system commands on the pgAdmin host. This impacts organizations using pgAdmin to manage PostgreSQL databases, as a malicious insider or compromised database account could gain full control of the pgAdmin server, potentially leading to data theft, lateral movement, and disruption of database operations. Leadership should prioritize patching due to the high severity and low attack complexity.
Apply vendor patch: update to pgAdmin 4 version 9.19 or later. Additionally, restrict Import/Export Data permissions to trusted users and monitor for anomalous command execution.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
OS command injection occurs when an application passes unsanitized user input directly into system shell commands.
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
pgAdmin <= 8.3 is affected by a path-traversal vulnerability while deserializing users’ sessions in the session handling
pgAdmin <= 8.4 is affected by a Remote Code Execution (RCE) vulnerability through the validate binary path API. Rated cr
The pgAdmin server includes an HTTP API that is intended to be used to validate the path a user selects to external Post
pgAdmin versions 8.11 and earlier are vulnerable to a security flaw in OAuth2 authentication. Rated medium severity (CVS
Remote code execution in pgAdmin 4 (versions up to and including 9.9) lets an attacker who can get a crafted PLAIN-forma
SQL injection sandbox escape in pgAdmin 4's AI Assistant (versions 9.13 through 9.16) lets an attacker break out of the
OS command injection in pgAdmin 4 (all versions before 9.18) lets an authenticated user with the commonly-granted tools_
pgAdmin <= 8.5 is affected by XSS vulnerability in /settings/store API response json payload. Rated medium severity (CVS
Cross-tenant credential theft in pgAdmin 4 (9.0 through 9.16) lets an authenticated non-owner user hijack another user's
pgAdmin <= 9.1 is affected by a security vulnerability with Cross-Site Scripting(XSS). Rated critical severity (CVSS 9.1
Command injection in pgAdmin 4 versions up to 9.9 on Windows allows an attacker who can supply a crafted file path to th
EUVD-2026-114382
GHSA-3jx6-4898-6q3m
NVD
CVE.org
EPSS
Exploit-DB