{"id":"CVE-2026-7816","url":"https://www.cyber-defence.io/tools/cve/CVE-2026-7816","generatedAt":"2026-10-28T10:35:59.714Z","title":"OS command injection (CWE-78) vulnerability in pgAdmin 4 Import/Export query export.","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.","published":"2026-05-11T16:17:38.000Z","lastModified":"2026-10-26T18:10:00.000Z","status":"Modified","sourceIdentifier":"f86ef6dc-4d3a-42ad-8f28-e6d5547a5007","cvss":{"version":"4.0","score":8.7,"severity":"HIGH","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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/M"},"cwe":["CWE-78"],"affected":["pgadmin/pgadmin 4"],"epss":{"score":0.01444,"percentile":0.73125,"date":"2026-10-27","history":[]},"kev":{"listed":false},"exploits":{"count":0,"verified":false,"firstPublished":null,"source":"Exploit-DB (https://gitlab.com/exploit-database/exploitdb)","entries":[]},"verdict":{"level":"high","text":"High impact if exploited, but EPSS currently rates exploitation as unlikely (1.44%). Schedule it in the normal patch cycle and watch for a rise in EPSS or a public exploit."},"changes":[],"references":[{"url":"https://github.com/pgadmin-org/pgadmin4/issues/9899","tags":["Issue Tracking","Patch","Vendor Advisory"],"source":"f86ef6dc-4d3a-42ad-8f28-e6d5547a5007"}],"sources":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-7816","epss":"https://www.first.org/epss/","kev":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","exploitdb":"https://www.exploit-db.com/"},"licence":"CC BY 4.0 — link back to the CVE Explorer if you publish the results; upstream data remains subject to its own terms."}