---
id: "CVE-2026-116252"
kind: "vulnerability"
aliases: ["CVE-2026-116252"]
title: "pgAdmin 4: materialized view refresh lets a database name redirect connections"
severity: "high"
cvss: 7.1
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["package", "pgadmin", "postgresql", "self-hosted"]
not_affected_if: ["pgadmin-9.19-or-later"]
published_at: "2026-10-30T20:17:05+00:00"
first_seen_at: "2026-10-30T20:25:37+00:00"
updated_at: "2026-10-30T20:26:39+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-116252", "first_seen_at": "2026-10-30T20:25:37+00:00"}]
---

# pgAdmin 4: materialized view refresh lets a database name redirect connections

pgAdmin 4 passed a target database's name unchanged to psql's --dbname argument, so a name containing a connection string could redirect the refresh to an attacker-chosen host and port. The connecting user's saved server password could then be sent to that endpoint, and the pgAdmin host could be made to open connections to arbitrary addresses.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed pgAdmin 4 version; the sources say versions before `9.19` are affected.
- Look for a materialized view refresh in pgAdmin that targets a database; the sources do not describe a narrower configuration.

## Fix

- pgAdmin 4: move to `9.19` or later (the sources state the fix is in releases from `9.19`).

## Timeline

- 2026-10-30T20:25:37+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-116252

## From the sources

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.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
