cve.bz

CVE-2026-12046 pgadmin pgadmin 4: Deserialization of Untrusted Data

9.5 criticalEPSS 1.0%Fix available

Critical (9.5) in pgadmin pgadmin 4. EPSS 1.0% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 4.0

9.5 critical
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H

CVSS 3.1

9.0 critical
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H
EPSS
1.0% (unchanged from 1.0% a week ago; 1.0% 30 days ago) estimated probability of exploitation activity in the next 30 days; 64th percentile. Scored 2026-11-17. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2026-06-22. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-306 Missing Authentication for Critical Functionality
CWE-502 Deserialization of Untrusted Data
OWASP Top 10
A07:2025 Authentication Failures, A08:2025 Software or Data Integrity Failures
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-12046 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-12046?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-12046?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-12046 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
pgadmin.org pgAdmin 4from 6.9 before 9.16

Linux distributions

DistributionReleasePackageFixed inAdvisory
openSUSETumbleweedpgadmin49.17-1.1openSUSE-SU-2026:11508-1

From the distributions' data via OSV.dev: SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: openSUSE.

Red Hat

Red Hat rates this Important.

Red Hat's statement

This is an Important flaw in pgAdmin 4, as it could lead to unauthenticated remote code execution on the server. However, successful exploitation requires an attacker to already possess the Flask SECRET_KEY and have write access to the pgAdmin sessions directory, which significantly raises the bar for exploitation and implies a prior compromise or misconfiguration. This vulnerability is specific to pgAdmin 4 deployments operating in server mode.

Red Hat's mitigation

To mitigate the risk, restrict network access to the pgAdmin 4 server. Configure firewall rules to allow connections only from trusted internal networks or localhost. For example, using `firewalld` on Red Hat Enterprise Linux, administrators can limit inbound traffic to the pgAdmin 4 listening port. This action may affect remote access to the pgAdmin 4 interface.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-12046.

Attack patterns (CAPEC)

  • CAPEC-586 Object Injection Likelihood: Medium · Severity: High
  • CAPEC-12 Choosing Message Identifier Likelihood: High · Severity: High
  • CAPEC-36 Using Unpublished Interfaces or Functionality Likelihood: Medium · Severity: High
  • CAPEC-62 Cross Site Request Forgery Likelihood: High · Severity: Very High
  • CAPEC-166 Force the System to Reset Values Severity: Medium
  • CAPEC-216 Communication Channel Manipulation

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON