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.
Affected software
| Software | Affected versions |
|---|---|
pgAdminServers and applications · cpe:a:pgadmin:pgadmin_4 |
|
About pgAdmin
graphical administration tool for PostgreSQL
- 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
Website Source code Docker image Package
Release lines
| Release | Latest | Security fixes |
|---|---|---|
| 9 | 9.19 | Yes |
| 8 | 8.14 | Ended 6 Feb 2025 |
| 7 | 7.8 | Ended 23 Nov 2023 |
| 6 | 6.21 | Ended 13 Apr 2023 |
| 5 | 5.7 | Ended 7 Oct 2021 |
| 4 | 4.30 | Ended 25 Feb 2021 |
From endoflife.date.
Vulnerabilities in pgAdmin
- In our list
- 61
- Published in the last 12 months
- 43
- Critical, last 12 months
- 10
- High, last 12 months
- 22
- Known exploited
- 0
- CVE-2026-116252pgAdmin 4: Materialized view refresh redirects its connection through a crafted database nameHigh 7.1 30 Oct 2026
- CVE-2026-116251pgAdmin 4: A user's other sessions survive a change of their passwordLow 2.3 30 Oct 2026
- CVE-2026-116250pgAdmin 4: Files opened in a storage directory follow a symbolic link, hard link or FIFO planted after the containment checkHigh 7.3 30 Oct 2026
- CVE-2026-116249pgAdmin 4: Connection file paths and parameter keys escape the user's storage directoryHigh 7.2 30 Oct 2026
- CVE-2026-116248pgAdmin 4: Non-administrators can share a server with every userMedium 6.0 30 Oct 2026
- CVE-2026-116247pgAdmin 4: libpq uses the pgAdmin service account's own password file and client certificateHigh 7.1 30 Oct 2026