Skip to main content
VulnerabilityPublished

CVE-2026-17347: pgAdmin 4 · OS Command Injection

Affects pgAdmin 4Source CVE Database V5

0
Compare

Not known to be exploited · CVSS 7.5 High : upgrade to 9.17 soon.

Data as of 30 Oct 2026, 06:59 UTC

CVSS 3.1 base score
7.5High
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.7% chance of exploitation in 30 days – higher than 53% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 9.17
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 31 Jul 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 29 Oct 2026.

What to do

Upgrade pgAdmin 4 to 9.17.

Affected software

ProductAffectedFixed in
pgadmin.orgpgAdmin 4Affected
  • >=7.2 <9.17
Fixed in
  • 9.17
GitHubpgAdmin 4pkg:github/pgAdmin 4Other threatsAffected
  • >=7.2 <9.17
Fixed in
  • 9.17

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

The vulnerability is fixed by changing the command execution method to use argument vector tokenization and shell=False, preventing shell metacharacters in usernames from being interpreted. Administrators should upgrade to pgAdmin 4 version 9.17 or later when available. Until then, avoid using untrusted usernames in shell commands or modify the MASTER_PASSWORD_HOOK to not rely on shell features. Review and adapt any hook scripts that depend on shell-specific behavior to run correctly under the new execution method.

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.

References

Community reviews

Loading reviews…