Read the docs
TI-2026-14307 Aliases CVE-2026-17347GHSA-f649-fjv9-qgcg

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

Priority LOW 37CWE-78Published · Updated

Key facts

Attack vector
Network
Privileges required
Low
User interaction
None
Attack complexity
High
Attack requirements
None
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-78.

Summary

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00716 54th percentileScored 2026-11-07
Fix Fixed pgAdmin 4 (pgadmin.org): 9.17

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
pgadmin.orgpgAdmin 47.2 to before 9.179.17Patch availableCNA
  • pgAdmin 4 Vendorpgadmin.org Affected 7.2 to before 9.17 Fixed in 9.17 Patch available CNA

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:pgadmin:pgadmin_4:*:*:*:*:*:postgresql:*:*7.2 to before 9.17Vulnerablepgadmin.org
  • cpe:2.3:a:pgadmin:pgadmin_4:*:*:*:*:*:postgresql:*:* Versions 7.2 to before 9.17 Vulnerable ·pgadmin.org

Remediation

  • Fix · CNA pgAdmin 4 (pgadmin.org) Fixed in 9.17

Fixed in the same release

Records fixed by the same vendor advisory or release, as the CNA lists them.

  • Release ·

    pgadmin.org pgAdmin 4 9.17

    6 records Highest priority Priority MEDIUM 3 MEDIUM, 3 LOW

    Other records, highest priority first

    • TI-2026-14311 SQL injection in pgadmin.org pgAdmin 4Priority MEDIUM 43
    • TI-2026-14309 pgAdmin 4: Adhoc server clone leaks another user's stored database credentials and ownership to a non-ownerPriority MEDIUM 42
    • TI-2026-14306 SQL injection in pgadmin.org pgAdmin 4Priority MEDIUM 41

Vendor assessments

Red Hat

Red Hat's page for this CVE →

Not affected: 1 product
  • Red Hat

Timeline

  1. 2026-10-02 Threatist record created from CVE-2026-17347
  2. 2026-10-03 Alias added: GHSA-f649-fjv9-qgcg

References

  • TI-2024-01901 Unsafe Deserialisation and Remote Code Execution by an Authenticated user in pgAdmin 4 CVSS 3.1CRITICAL 9.9
  • TI-2024-02918 Remote Code Execution Vulnerability through the validate binary path API in pgAdmin 4 CVSS 3.1CRITICAL 9.8
  • TI-2022-03867 Code injection in pgadmin4 CVSS 3.1HIGH 8.8
  • TI-2026-06875 pgAdmin 4: Cross-user data access and shared-server privilege escalation in server mode CVSS 4.0CRITICAL 9.4
  • TI-2025-02572 pgAdmin 4: Remote Code Execution in Query Tool and Cloud Deployment CVSS 3.1CRITICAL 9.9
  • TI-2023-00228 Path traversal in pgadmin CVSS 3.1MEDIUM 6.5
See all 56 →

Sources