CVE-2026-116252: pgAdmin 4 connection string injection via materialized view refresh

CVE-2026-116252 · Severity: medium · CVSS 6.5 · Published 2026-10-30

pgAdmin 4 is a web-based administration tool for PostgreSQL databases. When refreshing a materialized view, pgAdmin passes the database name directly to the psql command without sanitization. An attacker with CREATEDB privileges can create a database with a specially crafted name containing connection parameters, which libpq interprets as a full connection string, causing pgAdmin to connect to an attacker-controlled server and leak the user's saved password.

Technologies: pgAdmin Project pgAdmin 4. Vendors: pgAdmin Project.

Quick answers

Is CVE-2026-116252 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-116252 being exploited in the wild.
How severe is CVE-2026-116252?
Medium severity, with a CVSS score of 6.5, published 30 October 2026.
Which products and versions are affected?
pgAdmin Project pgAdmin 4 before 9.19.
Is there a fix for CVE-2026-116252?
Yes: fixed in pgAdmin 4 9.19. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-116252 attacked?
It is attacked over the network, in a web application.
Am I affected by CVE-2026-116252?
Check whether you run pgAdmin Project pgAdmin 4 at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • Fixed in: pgAdmin 4 9.19

Technical details

The vulnerability is a command injection flaw in the materialized view refresh function (MViewNode.refresh_data). The database name is passed unsanitized to psql's --dbname argument; libpq treats values containing "=" or postgresql:// URIs as full connection strings, allowing an attacker to override host, port, and other connection parameters. An attacker with CREATEDB privileges can craft a database name like 'host=attacker port=5432 dbname=postgres' to redirect connections and capture credentials. The fix routes the database name through the database_conninfo() helper function, which properly escapes it so libpq treats it only as a database name.

Affected products

  • pgAdmin Project pgAdmin 4 before 9.19

Timeline

  • 2026-10-30: disclosed

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.