---
id: CVE-2026-116252
title: >-
  pgAdmin 4: Materialized view refresh redirects its connection through a
  crafted database name
summary: >-
  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…
severity: medium
cvss: 6.5
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N'
cvssSource: cna
cwe:
  - CWE-88
  - CWE-522
  - CWE-918
vendor: pgadmin.org
product: pgAdmin 4
affected:
  - pgadmin_4 < 9.19
published: '2026-10-30'
updated: '2026-10-30'
sourceUpdated: '2026-10-30T19:55:20.208Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2026-116252'
references:
  - url: 'https://github.com/pgadmin-org/pgadmin4/issues/10645'
  - url: >-
      https://github.com/pgadmin-org/pgadmin4/commit/a1a43e8c28cf10cec73df0c476905562d19af483
tags:
  - cve.org
epss: 0.00258
epssPercentile: 0.17541
ingestedAt: '2026-11-05T16:24:31.431Z'
---

## Overview

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.

## Affected

- `pgadmin_4 < 9.19`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
