Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain low-privileged DB account
-
DeliveryInject malicious SQL into rules JSON key
-
ExploitWait for superuser to run import_database_rules()/import_roles_rules()
-
ExecutionSQL executes with superuser context
-
PersistCreate attacker superuser role
-
ImpactFull 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv3 – 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)
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.
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
Affected Packages
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
AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
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.
Primary rating from Vendor (PostgreSQL).
CVSS VectorNVD
Lifecycle Timeline
5DescriptionNVD
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
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.
Apply vendor patch: PostgreSQL Anonymizer 3.1.1 or later.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.
More in PostgreSQL
View allPostgreSQL libpq functions PQescapeLiteral(), PQescapeIdentifier(), PQescapeString(), and PQescapeStringConn() improperl
An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl
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
Unauthenticated arbitrary file write in Splunk Enterprise (below 10.2.4 and 10.0.7) and Splunk Cloud Platform (below 10.
Unauthenticated SQL injection in Sangoma Switchvox SMB Edition 8.3 (build 104997) lets remote attackers execute arbitrar
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
The build_tablename function in pgsql.c in the PostgreSQL (aka pgsql) extension in PHP through 5.6.7 does not validate t
A vulnerability in the h2oai/h2o-3 REST API versions 3.46.0.4 allows unauthenticated remote attackers to execute arbitra
In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and users in the 'pg_execute_serve
Unauthenticated SQL injection in Vendure Shop API allows remote attackers to execute arbitrary SQL commands against the
Parse Server is an open source http web server backend. Rated critical severity (CVSS 10.0), this vulnerability is remot
Hard-coded default PostgreSQL credentials shipped in the docker-compose.yaml of langgenius Dify through version 1.5.1 al
EUVD-2026-36266
GHSA-g5vm-7gwv-45rj
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB