Missing authentication in pgadmin.org pgAdmin 4
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- Security bypass, 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-306 and CWE-502.
Summary
Two state-mutating endpoints in pgAdmin 4's SQL Editor blueprint -- DELETE /sqleditor/close/<trans_id> and POST /sqleditor/initialize/sqleditor/update_connection/<sgid>/<sid>/<did> -- were the only routes in the module missing the @pga_login_required decorator. Both reach a pickle.loads sink on session['gridData'][<trans_id>]['command_obj']: the close endpoint via close_sqleditor_session(), and update_sqleditor_connection via check_transaction_status(). In server mode these endpoints were reachable without any authenticated pgAdmin session. The defect is a missing-authentication-on-critical-function (CWE-306) wrapper around a deserialization-of-untrusted-data sink (CWE-502). Exploiting it for remote code execution requires the attacker to also forge a server-side session file whose gridData entry contains a malicious pickle payload, which in turn requires both (a) knowledge of pgAdmin's Flask SECRET_KEY (no chain to leak it is described here -- the attacker must already possess it) and (b) write access to pgAdmin's sessions/ directory on the host. Neither precondition is granted by this defect on its own. When those preconditions are met from another channel (misconfigured deployment, prior compromise, leaked configuration), the missing auth gate is the final hop that turns an existing partial compromise into unauthenticated code execution in the pgAdmin process -- and, by extension, on the host under whatever account runs pgAdmin. Fix is a one-line @pga_login_required decorator on each of the two endpoints, matching the convention used by every other route in the module. The is_authenticated / MFA chain now runs before the trans_id is dereferenced, so an unauthenticated request is rejected before reaching the deserialization path. The defect is server-mode only. In DESKTOP mode pgAdmin's before_request hook re-authenticates DESKTOP_USER on every request, so no endpoint can be exercised in an unauthenticated state and no auth decorator (or its absence) is meaningful. The accompanying regression test mirrors the attacker's path -- harvests an X-pgA-CSRFToken from GET /login and replays it against both endpoints -- and self-skips outside server mode for that reason; it is wired into the existing server-mode CI workflow alongside the data-isolation tests. This issue affects pgAdmin 4: from 6.9 before 9.16.
Why it matters now
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
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| pgadmin.org | pgAdmin 4 | 6.9 to before 9.16 | 9.16 | Patch available | CNA |
- pgAdmin 4 Vendorpgadmin.org Affected 6.9 to before 9.16 Fixed in 9.16 Patch available CNA
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:pgadmin:pgadmin_4:*:*:*:*:*:postgresql:*:* | 6.9 to before 9.16 | Vulnerable | pgadmin.org |
- cpe:2.3:a:pgadmin:pgadmin_4:*:*:*:*:*:postgresql:*:* Versions 6.9 to before 9.16 Vulnerable ·pgadmin.org
Remediation
- Fix · CNA pgAdmin 4 (pgadmin.org) Fixed in 9.16
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.16
7 records Highest priority Priority MEDIUM 4 MEDIUM, 3 LOW
Other records, highest priority first
- TI-2026-10382 pgAdmin 4: AI Assistant read-only transaction bypass allows unauthorised writes and remote code executionPriority MEDIUM 43
- TI-2026-10385 pgAdmin 4: Stored XSS via untrusted error and plan-node text rendered through html-react-parserPriority MEDIUM 42
- TI-2026-10381 pgAdmin 4: SQL injection in COMMENT ON ... IS '<description>' rendering across dialog templatesPriority MEDIUM 41
Vendor assessments
Timeline
- 2026-10-02 Threatist record created from CVE-2026-12046
- 2026-10-03 Alias added: GHSA-mmqg-h4qx-g8qv
References
More pgadmin.org Pgadmin 4 vulnerabilities
- 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
Sources
- CVE-2026-12046 · CVE Program
- CVE-2026-12046 · NVD
- FIRST EPSS
- GHSA-mmqg-h4qx-g8qv · GitHub Advisory Database · CC BY 4.0
- CVE-2026-12046 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences