{"cve":"CVE-2026-7816","nvd":{"published":"2026-05-11T16:17:38.260","modified":"2026-10-26T18:10:00.173","status":"Modified","description":"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.","cvss_v4":{"vector":"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","score":8.7},"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8},"cwes":["CWE-78"],"references":["https://github.com/pgadmin-org/pgadmin4/issues/9899"],"products":["pgadmin:pgadmin_4"],"source":"nvd","synced_at":"2026-10-26T18:27:13.530666824+00:00"},"epss":{"cve":"CVE-2026-7816","score":0.01444,"percentile":0.73078,"date":"2026-10-26"},"kev":null,"osv":[{"id":"GHSA-j74f-g7vx-fh4x","url":"https://osv.dev/vulnerability/GHSA-j74f-g7vx-fh4x","summary":"pgAdmin 4: OS command injection vulnerability in Import/Export query export","modified":"2026-09-10T03:50:47.178280373Z","packages":[{"ecosystem":"PyPI","name":"pgadmin4","purl":"pkg:pypi/pgadmin4","ranges":["<9.15"],"fixed":["9.15"]}]},{"id":"PYSEC-2026-2870","url":"https://osv.dev/vulnerability/PYSEC-2026-2870","summary":"pgAdmin 4: OS command injection vulnerability in Import/Export query export","modified":"2026-07-13T16:32:56.108505340Z","packages":[{"ecosystem":"PyPI","name":"pgadmin4","purl":"pkg:pypi/pgadmin4","ranges":["<9.15"],"fixed":["9.15"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}