CVE-2026-116252

pgAdmin 4: Materialized view refresh redirects its connection through a crafted database name

Published Oct 30, 2026 CVSS 4.0 · 7.1 High EPSS < 1% KEV · Not listed
Description
pgAdmin 4's materialized view refresh passed the target database's name to psql's --dbname argument unchanged. libpq treats a --dbname value containing "=" (or a postgresql:// URI) as a full connection string, whose keywords override the host, port and other settings pgAdmin had supplied. A database whose name is such a string, which any role with CREATEDB can create, therefore redirected the psql process pgAdmin starts for the refresh to a host and port of the creator's choosing, and the connecting user's saved server password was presented to that endpoint. It also let the pgAdmin host be made to open connections to arbitrary addresses.

The same weakness was fixed for Backup, Restore, Maintenance and Import/Export Data in earlier releases (CVE-2026-86862); the materialized view refresh was the remaining caller. The fix routes the name through the same database_conninfo() helper, so libpq treats it strictly as a database name.

This issue affects pgAdmin 4: before 9.19.

Analysis

AI-generated

Technical impact

The flaw in pgAdmin 4 permits an attacker to craft a database name containing an equals sign or a PostgreSQL URI; when a materialized view refresh is issued, this name is passed unchanged to psql's --dbname option. libpq interprets such a value as a full connection string, overriding the host, port, and other parameters supplied by pgAdmin. As a result, the refresh process connects to an arbitrary host chosen by the attacker, sending the user’s saved server password to that endpoint and potentially opening additional connections from the pgAdmin host to malicious addresses.

Affected Systems

The affected product is pgAdmin 4 from pgadmin.org, in all releases prior to version 9.19, encompassing both the open‑source and commercial editions.

Risk and Exploitability

With a CVSS score of 7.1 this vulnerability is considered high severity. The EPSS score is not available and the issue is not listed in CISA KEV, indicating no known widespread exploitation. The attack requires the ability to create a database with a crafted name—a capability that any role possessing the CREATEDB privilege can exercise. By creating such a database, an attacker can entice a legitimate user to perform a materialized view refresh, causing that user's credentials to be transmitted to the attacker‑controlled host and enabling unintended remote connections.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade pgAdmin 4 to version 9.19 or later, which sanitizes the database name before passing it to libpq.
  • If an upgrade cannot be performed immediately, apply the patch from the commit a1a43e8c28cf10cec73df0c476905562d19af483 to the local source or binary build.
  • Reduce or remove CREATEDB privileges for accounts that do not need to create databases, preventing the construction of malicious database names.
  • Consider disabling the materialized view refresh feature or monitor refresh operations for unusual database names until a permanent fix is applied.

Generated by OpenCVE AI on October 30, 2026 at 21:58 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
CPEs cpe:2.3:a:pgadmin:pgadmin_4:*:*:*:*:*:*:*:*
Type Values Removed Values Added
First Time appeared Pgadmin
Pgadmin pgadmin 4
Vendors & Products Pgadmin
Pgadmin pgadmin 4
Type Values Removed Values Added
Description pgAdmin 4's materialized view refresh passed the target database's name to psql's --dbname argument unchanged. libpq treats a --dbname value containing "=" (or a postgresql:// URI) as a full connection string, whose keywords override the host, port and other settings pgAdmin had supplied. A database whose name is such a string, which any role with CREATEDB can create, therefore redirected the psql process pgAdmin starts for the refresh to a host and port of the creator's choosing, and the connecting user's saved server password was presented to that endpoint. It also let the pgAdmin host be made to open connections to arbitrary addresses. The same weakness was fixed for Backup, Restore, Maintenance and Import/Export Data in earlier releases (CVE-2026-86862); the materialized view refresh was the remaining caller. The fix routes the name through the same database_conninfo() helper, so libpq treats it strictly as a database name. This issue affects pgAdmin 4: before 9.19.
Title pgAdmin 4: Materialized view refresh redirects its connection through a crafted database name
Weaknesses CWE-522
CWE-88
CWE-918
References
Metrics cvssV3_1

{'score': 6.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N'}

cvssV4_0

{'score': 7.1, 'vector': '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'}

Weaknesses
  • CWE-522

    Insufficiently Protected Credentials

  • CWE-88

    Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')

  • CWE-918

    Server-Side Request Forgery (SSRF)

Sources

Status
PUBLISHED
Assigner
PostgreSQL
Published
Updated
Nov 6, 2026, 4:04 PM
Reserved
Oct 25, 2026, 4:26 PM
Status
Analyzed
Published
Oct 30, 2026, 8:17 PM
Modified
Nov 6, 2026, 4:17 PM