CVE-2026-7816: pgAdmin 4 OS Command Injection Vulnerability Vulnerability
HIGHCVE-2026-7816 is a HIGH (CVSS 8.8) os command injection vulnerability vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting pgAdmin 4 libraries in the PyPI ecosystem. The issue involves os command injection vulnerability in import/export query export. Remediation is available by upgrading affected packages to version 9.15.
CVE-2026-7816 at a Glance
Security Impact
CVSS: 8.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2026-7816
To remediate this vulnerability, upgrade all affected pgAdmin 4 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install pgadmin4>=9.15
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show pgadmin4
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-7816, inspect your installed packages using pip:
pip show pgadmin4
Analyze the terminal output to locate any version of pgAdmin 4 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 9.15), your application is affected.
Note: The pip show pgadmin4 command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the product constructs all or part of an sql command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended sql command when it is sent to a downstream component. without sufficient removal or quoting of sql syntax in user-controllable inputs, the generated sql query can cause those inputs to be interpreted as sql instead of ordinary user data. In pgAdmin 4, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-7816 Affected pgAdmin 4 Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
pgadmin4
|
PyPI |
< 9.15
|
9.15
|
References
Frequently Asked Questions
What is CVE-2026-7816?
Which pgAdmin 4 versions are affected?
What version fixes CVE-2026-7816?
Is pgadmin4 affected?
What is the CVSS score of CVE-2026-7816?
What CWE is associated with CVE-2026-7816?
How can I check PyPI dependencies for CVE-2026-7816?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-j74f-g7vx-fh4x",
"modified" : "2026-05-18T14:31:21Z",
"published" : "2026-05-11T18:31:44Z",
"aliases" : [ "CVE-2026-7816" ],
"summary" : "pgAdmin 4: OS command injection vulnerability in Import/Export query export",
"details" : "OS command injection (CWE-78) vulnerability in pgAdmin 4 Import/Export query export.\n\nUser-supplied input was interpolated directly into a psql \\copy metacommand template without sanitization. An authenticated user could inject \") TO PROGRAM 'cmd'\" to break out of the \\copy (...) context and achieve arbitrary command execution on the pgAdmin server, or \") TO '/path'\" for arbitrary file write. Additional fields (format, on_error, log_verbosity) were also raw-interpolated and exploitable.\n\nFix adds a parens-balance parser modeled on psql's strtokx tokenizer, allow-lists format/on_error/log_verbosity, rejects null bytes in the query, and tightens type and gating checks.\n\nThis issue affects pgAdmin 4: before 9.15.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "pgadmin4"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "9.15"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-7816"
}, {
"type" : "WEB",
"url" : "https://github.com/pgadmin-org/pgadmin4/issues/9899"
}, {
"type" : "WEB",
"url" : "https://github.com/pgadmin-org/pgadmin4/commit/13badc62c"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/pgadmin-org/pgadmin4"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-78", "CWE-89" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-18T14:31:21Z",
"nvd_published_at" : "2026-05-11T16:17:38Z"
}
}