All vulnerabilities

Servers and applications

CVE-2026-7816

OS command injection (CWE-78) vulnerability in pgAdmin 4 Import/Export query export. User-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.…

Severity
High 8.7
Published
11 May 2026
Last changed
26 Oct 2026
Added to UpHeron
1 Nov 2026
Fixed in
9.15
Exploit chance
1.4% in the next 30 daysHigher than 73% of CVEs. EPSS by FIRST, 19 Nov 2026
Weakness
OS command injection (CWE-78)
Attack
Over the network · Needs a user account · No user action needed
Attacker can
Read data · Change data · Take it down
CVSS 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/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Sources
NVD

Description

OS command injection (CWE-78) vulnerability in pgAdmin 4 Import/Export query export.

User-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.

Fix 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.

This issue affects pgAdmin 4: before 9.15.

From NVD.

Affected software

SoftwareAffected versions
pgAdminServers and applications · cpe:a:pgadmin:pgadmin_4
  • From 9.4 before 9.15

About pgAdmin

graphical administration tool for PostgreSQL

From Wikidata, CC0 1.0.
Weekly downloads (PyPI)
5,570PyPI Stats, 15 Nov 2026
Docker Hub pulls
455,658,756Docker Hub, 15 Nov 2026
GitHub stars
3,940GitHub, 15 Nov 2026
Forks
921GitHub, 15 Nov 2026
License
PostgreSQL LicenseWikidata
Written in
Python, JavaScriptWikidata
First published on GitHub
20 Feb 2017GitHub

Release lines

ReleaseLatestSecurity fixes
99.19Yes
88.14Ended 6 Feb 2025
77.8Ended 23 Nov 2023
66.21Ended 13 Apr 2023
55.7Ended 7 Oct 2021
44.30Ended 25 Feb 2021

From endoflife.date.

References

  • NVD https://nvd.nist.gov/vuln/detail/CVE-2026-7816
  • CVE.org https://www.cve.org/CVERecord?id=CVE-2026-7816