CVE-2026-17347

pgAdmin 4: OS command injection in MASTER_PASSWORD_HOOK via untrusted username substitution

HIGH
8.8
CVSS Score
Published: July 31, 2026 at 03:59 PM UTC
Updated: October 23, 2026 at 11:10 PM UTC
2 products affected across 2 vendorspgAdmin 4pgAdmin 4

Using pgAdmin 4 by pgadmin.org?

Get instant alerts when new vulnerabilities affect pgAdmin 4 - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH8.8
Exploit prediction
EPSS 0.7%
SSVC
No known exploit

Description

The MASTER_PASSWORD_HOOK setting, introduced in pgAdmin 4 7.2, lets an administrator configure an external command that returns a per-user encryption key, with %u in the configured string replaced by the current user's name. The previous implementation substituted the username directly into the command string and executed the result with subprocess.Popen(..., shell=True). Because the username can originate from an external authentication source (OAuth/OIDC claims, Kerberos, webserver auth) rather than a value pgAdmin fully controls, a username containing shell metacharacters (';', '$()', backticks, pipes, '&&', newlines) allowed an authenticated user to execute arbitrary commands as the pgAdmin service account in any deployment where the configured hook string uses %u. Fix tokenises the trusted, administrator-configured hook string into an argument vector first (using shlex in POSIX-quoting mode, with backslash-escaping disabled so Windows-style paths are not mis-parsed), substitutes the untrusted username into the individual argv elements, and executes with shell=False. The username is therefore always confined to a single argv element; any shell metacharacters it contains are inert. Administrators whose MASTER_PASSWORD_HOOK previously relied on shell features (pipes, redirection, environment-variable expansion, globbing) within the hook string itself must move that logic into the invoked script, since it is no longer interpreted by a shell. This issue affects pgAdmin 4: from 7.2 before 9.17.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

All versions7.2 ≤ v < 9.17
Affected range stops below 9.17, so it looks safe — our inference, not a vendor statement
7.2 ≤ v < 9.177.2
Affected range stops below 9.17, so it looks safe — our inference, not a vendor statement

References (3)

Issue TrackingPatchVendor Advisory
Source: f86ef6dc-4d3a-42ad-8f28-e6d5547a5007
https://github.com/pgadmin-org/pgadmin4/issues/10191

SSVC — Action Prioritization

SSVCNo known exploitNot automatableTotal impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
NETWORK
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Vector?

Quick Info

StatusANALYZED
CWE
CWE-78CWE-88

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card