Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessGain regular database user access
-
DeliveryCraft JSON rules document with SQL-injected object name
-
ExploitStore malicious document where superuser will import it
-
ExecutionInduce superuser to call anon.import_database_rules() or anon.import_roles_rules()
-
PersistInjected SQL executes with superuser privileges
-
ImpactFull PostgreSQL instance 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 | Exploitation requires the attacker to hold at minimum a regular PostgreSQL user account with the ability to create or modify a JSON document that a superuser will subsequently import using anon.import_database_rules() or anon.import_roles_rules(). The PostgreSQL Anonymizer extension must be installed and the import workflow must be actively used. Exploitation is limited by three concrete factors: (1) the attacker must have write access to contribute the malicious JSON rules document; (2) a superuser must actively invoke one of the two import functions after the malicious document is planted - this is a required user-interaction step and cannot be forced remotely; and (3) the extension must be deployed and the import functions must be part of the operational workflow. Default PostgreSQL installations without the extension installed are not affected. |
| Impact | The vendor-supplied CVSS score of 6.4 (AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:H) reflects the multi-step nature of the attack and the dependency on superuser interaction. However, the PR:H metric appears inconsistent with the description, which states that 'a user' - not a superuser - creates the malicious JSON; this suggests PR:L is more accurate for the attacker's initial step, which would push the base score toward 7.5. This discrepancy should be verified with Dalibo. The AC:H and UI:R metrics are well-grounded: exploitation requires the attacker to successfully plant a document that a superuser will later import, creating an indirect, social-engineering-dependent exploitation path. There is no EPSS data or CISA KEV listing available, and no public exploit has been identified, indicating no confirmed active exploitation at time of analysis. Practical risk is elevated in deployments where database roles are loosely separated and untrusted users can contribute or modify anonymization rule files. |
| Exploit ScenarioDerived | An attacker with a regular database account creates a JSON anonymization rules document in which one object name (e.g., a column identifier) contains embedded SQL such as a COPY command or a superuser password-change statement. During a routine anonymization configuration refresh, a database superuser calls anon.import_database_rules() to load the new rules; the injected SQL executes with superuser privileges, granting the attacker the ability to read all data, modify any table, or create backdoor superuser accounts. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 06, 2026
SQL injection in PostgreSQL Anonymizer's anon.import_database_rules() and anon.import_roles_rules() functions enables privilege escalation to superuser-level code execution within PostgreSQL. A low-privileged database user plants a malicious JSON rules document containing crafted object names (such as schema, table, or column identifiers); when a superuser subsequently invokes either import function, the injected SQL executes with superuser privileges, yielding full database compromise. The vendor has released a fix in version 3.1.4; no public exploit has been identified at time of analysis.
RemediationAI
Upgrade PostgreSQL Anonymizer to version 3.1.4 or later, which contains the vendor-released patch; the fix is tracked in the GitLab issue at https://gitlab.com/dalibo/postgresql_anonymizer/-/issues/665. If immediate upgrade is not possible, restrict write access to any JSON rules documents that a superuser would import via these functions - specifically, ensure untrusted or semi-trusted database users cannot create or modify anonymization rule sets destined for import. As a compensating control, audit all JSON rule documents for suspicious object names before any superuser invokes the import functions, and confine use of anon.import_database_rules() and anon.import_roles_rules() to controlled, administrator-only maintenance windows with reviewed inputs only. Disabling or removing the PostgreSQL Anonymizer extension entirely removes exposure if anonymization workflows can be paused.
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 (CPE: cpe:2.3:a:dalibo:postgresql_anonymizer) is a PostgreSQL extension maintained by Dalibo that implements data masking and anonymization rules for GDPR and similar compliance scenarios. The import functions anon.import_database_rules() and anon.import_roles_rules() accept JSON documents describing anonymization rule sets and dynamically construct SQL from the parsed JSON object names. The root cause (CWE-89, SQL Injection) is the failure to properly sanitize or parameterize JSON-supplied identifiers - schema names, table names, column names - before embedding them into SQL statements. Because PostgreSQL cannot bind identifiers as parameters the way it binds values, safe identifier quoting (e.g., using quote_ident()) must be applied explicitly. Omitting this allows an attacker-controlled string to break out of the identifier context and inject arbitrary SQL. The injected SQL inherits the privilege level of the calling session, which in this workflow is a superuser.
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:H/UI:R/S:U/C:H/I:H/A:H
Attacker is described as 'a user' (PR:L, not superuser); superuser must actively call import function (UI:R, AC:H); full CIA impact once injected SQL runs as superuser.
Primary rating from Vendor (PostgreSQL).
CVSS VectorVendor: PostgreSQL
Lifecycle Timeline
1DescriptionCVE.org
PostgreSQL Anonymizer contains a SQL injection vulnerability in two import functions. A user can create a malicious JSON document containing specially crafted object names. If a superuser subsequently calls anon.import_database_rules() or anon.import_roles_rules(), the malicious code is executed with superuser privileges. The issue is fixed in PostgreSQL Anonymizer 3.1.4 and 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-72142
GHSA-65m7-qhmp-8j4v
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB