{"id":"CVE-2026-7816","published":"2026-05-11T14:35:50Z","modified":"2026-05-26T13:39:15Z","title":"pgAdmin 4: OS command injection in Import/Export query export via psql metacommand breakout","vendor":"pgadmin.org","product":"pgAdmin 4","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01444,"percentile":0.73907,"provenance":"source"},"cwes":[{"id":"CWE-78","name":"Improper Neutralization of Special Elements used in an OS Command"}],"references":[{"url":"https://github.com/pgadmin-org/pgadmin4/issues/9899","tags":["issue-tracking"]}],"priority":{"score":20.9,"factors":[{"name":"EPSS percentile","points":14.78},{"name":"CVSS severity","points":6.16}]},"vendorSlug":"pgadmin-org","affectedVersions":[{"vendor":"pgadmin.org","product":"pgAdmin 4","versions":[">= 9.4, < 9.15"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-05-11T16:08:21.423663Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"pgadmin4","vulnerableRanges":["<9.15"],"patched":["9.15"],"from":["GHSA-j74f-g7vx-fh4x","PYSEC-2026-2870"],"provenance":"source"}],"summary":{"text":"OS command injection (CWE-78) exists in the Import/Export query export feature of pgAdmin 4, where user input was interpolated unsanitized into a psql \\copy metacommand template. An authenticated user can break out of the \\copy context to execute arbitrary commands or write arbitrary files on the pgAdmin server, requiring only valid credentials and no user interaction.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T07:08:28Z"},"euvd":{"id":"EUVD-2026-29084","exploited":false,"provenance":"source"}}