Skip to main content

PostgreSQL Anonymizer CVE-2026-11945

| EUVDEUVD-2026-36266 HIGH
SQL Injection (CWE-89)
2026-06-11 PostgreSQL GHSA-g5vm-7gwv-45rj
7.5
CVSS 3.1 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain low-privileged DB account
  2. Delivery
    Inject malicious SQL into rules JSON key
  3. Exploit
    Wait for superuser to run import_database_rules()/import_roles_rules()
  4. Execution
    SQL executes with superuser context
  5. Persist
    Create attacker superuser role
  6. Impact
    Full database compromise

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Persistence

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Attacker must (1) hold an authenticated PostgreSQL role with the ability to write the JSON rules document later consumed by the anon extension (e.g., insert into the rules table, modify the file on disk, or supply the file path) and (2) wait for or induce a superuser to invoke anon.import_database_rules() or anon.import_roles_rules() against that JSON. Exploitation is LIMITED by: requiring an existing database account (PR:L), requiring the anon extension to be installed at a version below 3.1.1, requiring a superuser to actually run one of the two named import functions on attacker-influenced input, and the malicious payload must be placed in the specific vulnerable JSON key-value pair identified by the vendor. No special PostgreSQL configuration beyond having the anon extension installed and using its rule-import workflow.

Impact

Signals here pull in opposite directions and must be weighed carefully: the CVSS 3.1 base score of 7.5 (AV:N/AC:H/PR:L/UI:N/C:H/I:H/A:H) reflects total compromise of the database, but EPSS is only 0.04% (12th percentile) and CISA SSVC marks Exploitation as none and Automatable as no. The vector lists UI:N, yet the description requires a superuser to invoke the importer against attacker-supplied JSON - that is effectively a deferred user/admin action, so the AV:N/UI:N rating likely understates the social/operational gating. PR:L is consistent with the requirement that the attacker first be an authenticated database user able to write the JSON rules file or row. The CVE is not in CISA KEV and no POC is referenced. Net assessment: high impact but low likelihood - prioritize patching in environments where rule import is performed by superusers and where untrusted users can influence the rules JSON, but it is not an emergency for instances where only trusted operators produce the rules file.

Exploit ScenarioDerived

A low-privileged but authenticated database user who can influence the masking/role rules JSON (for example by writing to a shared rules table or file consumed during restore) embeds malicious SQL inside the targeted key-value pair. Later, a DBA running maintenance executes SELECT anon.import_database_rules(...) or anon.import_roles_rules(...) as a superuser, at which point the embedded SQL runs with superuser privileges and the attacker creates a new superuser role or exfiltrates protected data. No public exploit identified at time of analysis, but the pattern is a straightforward CWE-89 string-interpolation injection once the offending JSON key is identified.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv3 – Jun 16, 2026

Privilege escalation in PostgreSQL Anonymizer versions prior to 3.1.1 allows a low-privileged database user to achieve superuser execution by embedding malicious code in a crafted JSON key-value pair that is later processed by the import_database_rules() or import_roles_rules() functions when invoked by a superuser. The attack is a stored payload that requires a superuser to trigger import of attacker-controlled rules, and no public exploit identified at time of analysis. SSVC marks exploitation as none and not automatable, but technical impact is total once the trigger condition is met.

Earlier versions of this analysis (2)
v2 Jun 16, 2026 - 14:27 cvss changed CVSS 7.5

Privilege escalation to superuser in PostgreSQL Anonymizer versions prior to 3.1.1 allows a low-privileged database user to smuggle malicious code inside a crafted JSON document that, when imported via import_database_rules() or import_roles_rules() by a superuser, executes with superuser privileges. No public exploit identified at time of analysis, but SSVC rates technical impact as total and EPSS sits at 0.04% (12th percentile), indicating low predicted near-term exploitation activity.

v1 Jun 11, 2026 - 17:16 CVSS 6.4

Privilege escalation in PostgreSQL Anonymizer (Dalibo) allows a lower-privileged database user to attain superuser rights by embedding malicious SQL code within a crafted JSON document. When a superuser subsequently calls import_database_rules() or import_roles_rules() against that document, the injected payload executes in the superuser's privilege context. No public exploit code has been identified at time of analysis, and the issue is resolved in version 3.1.1.

RemediationAI

Vendor-released patch: PostgreSQL Anonymizer 3.1.1 - upgrade the extension to 3.1.1 or later on every PostgreSQL instance where the extension is installed, per the upstream issue at https://gitlab.com/dalibo/postgresql_anonymizer/-/issues/643 and the NVD record at https://nvd.nist.gov/vuln/detail/CVE-2026-11945. If patching must be deferred, do not call import_database_rules() or import_roles_rules() as a superuser against any JSON document whose contents could have been influenced by non-superusers; instead, review the JSON manually and import it through a least-privileged role that cannot escalate (side effect: import may fail where the rules legitimately require elevated privileges). Additionally, revoke EXECUTE on these two functions from PUBLIC and grant only to a dedicated administrative role, and treat the rules JSON as untrusted input by storing it outside of database-writable locations.

Affected VersionsENISA

PostgreSQL Anonymizer 1 <3.1.1

Affected Packages

euvd postgresql_anonymizer fix: 3.1.1

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

PostgreSQL Anonymizer (by Dalibo) is a PostgreSQL extension that masks personal data via declarative masking rules; the import_database_rules() and import_roles_rules() helper functions ingest JSON documents describing masking and role-rule configurations. The root cause class is CWE-89 (SQL Injection): values supplied inside particular JSON keys are concatenated or otherwise interpolated into SQL executed in the importer's session, so an attacker-controlled string becomes executable SQL. Because the import routines are typically invoked by a superuser performing administrative restoration, the injected SQL inherits SECURITY DEFINER-equivalent superuser context. The affected CPE is cpe:2.3:a:dalibo:postgresql_anonymizer:*:*:*:*:*:*:*:* across all versions up to but not including 3.1.1.

Know when PostgreSQL gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (PostgreSQL) PRIMARY MEDIUM
NVD 7.5 HIGH
AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 8.0 HIGH

Authenticated user (PR:L) plants payload over the network (AV:N); a superuser must later run the importer (UI:R, AC:H), and execution crosses the role boundary into the superuser security context (S:C) with total impact.

3.1 AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H
4.0 AV:N/AC:H/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H

Primary rating from Vendor (PostgreSQL).

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
High
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

5
Analysis Updated
Jun 16, 2026 - 14:28 vuln.today
v3 - CVSS changed
Analysis Updated
Jun 16, 2026 - 14:27 vuln.today
v2 - CVSS changed
Severity Changed
Jun 16, 2026 - 14:22 NVD
MEDIUM HIGH
CVSS changed
Jun 16, 2026 - 14:22 NVD
6.4 (MEDIUM) 7.5 (HIGH)
Patch available
Jun 11, 2026 - 18:01 EUVD

DescriptionNVD

PostgreSQL Anonymizer contains a vulnerability that allows a user to gain superuser privileges by creating a JSON document and placing malicious code inside a particular key-value pair. If a superuser calls the import_database_rules() or import_roles_rules() functions, the malicious code is executed with superuser privileges. The problem is resolved in PostgreSQL Anonymizer 3.1.1 and further versions

Executive ViewAI

Why It Matters

PostgreSQL Anonymizer versions prior to 3.1.1 contain a privilege escalation vulnerability (CVE-2026-11945, CVSS 7.5) that allows low-privileged database users to gain superuser access by embedding malicious code in database rules. No public exploit code is currently available, but affected organizations must address this privilege escalation risk to prevent unauthorized administrative access to PostgreSQL instances, potentially compromising data confidentiality and system integrity.

Business Impact: High
Compensating Controls

Apply vendor patch: PostgreSQL Anonymizer 3.1.1 or later.

Threat Intelligence Overview

EPSS Score
0.0%
Top 88% exploitable
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

38
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.

CVE-2025-1094 HIGH POC
8.1 Feb 13

PostgreSQL libpq functions PQescapeLiteral(), PQescapeIdentifier(), PQescapeString(), and PQescapeStringConn() improperl

CVE-2024-55964 CRITICAL POC
9.8 Mar 26

An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl

CVE-2013-1899 MEDIUM POC
6.5 Apr 04

Argument injection vulnerability in PostgreSQL 9.2.x before 9.2.4, 9.1.x before 9.1.9, and 9.0.x before 9.0.13 allows re

CVE-2026-20253 CRITICAL POC
9.8 Jun 10

Unauthenticated arbitrary file write in Splunk Enterprise (below 10.2.4 and 10.0.7) and Splunk Cloud Platform (below 10.

CVE-2026-9586 CRITICAL POC
9.3 Jul 17

Unauthenticated SQL injection in Sangoma Switchvox SMB Edition 8.3 (build 104997) lets remote attackers execute arbitrar

CVE-2017-7546 CRITICAL
9.8 Aug 16

PostgreSQL versions before 9.2.22, 9.3.18, 9.4.13, 9.5.8 and 9.6.4 are vulnerable to incorrect authentication flaw allow

CVE-2015-1352 MEDIUM POC
5.0 Mar 30

The build_tablename function in pgsql.c in the PostgreSQL (aka pgsql) extension in PHP through 5.6.7 does not validate t

CVE-2024-10553 CRITICAL POC
9.8 Mar 20

A vulnerability in the h2oai/h2o-3 REST API versions 3.46.0.4 allows unauthenticated remote attackers to execute arbitra

CVE-2019-9193 HIGH POC
7.2 Apr 01

In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and users in the 'pg_execute_serve

CVE-2026-40887 CRITICAL POC
9.1 Apr 14

Unauthenticated SQL injection in Vendure Shop API allows remote attackers to execute arbitrary SQL commands against the

CVE-2022-24760 CRITICAL POC
10.0 Mar 12

Parse Server is an open source http web server backend. Rated critical severity (CVSS 10.0), this vulnerability is remot

CVE-2025-56157 CRITICAL POC
9.8 Dec 18

Hard-coded default PostgreSQL credentials shipped in the docker-compose.yaml of langgenius Dify through version 1.5.1 al

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy