Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate as masked database user
-
DeliveryDefine malicious operator, domain cast, or view with injected SQL payload
-
ExploitIssue query that triggers masking rule evaluation
-
ExecutionExtension evaluates payload in elevated security context
-
PersistAttacker gains extension-owner or superuser privileges
-
ImpactExecute arbitrary SQL or OS commands as privileged role
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 | The target system must have the PostgreSQL Anonymizer extension installed and active, and the attacker must hold an authenticated database account that has been designated as a 'masked' user subject to anonymization rules. The attacker must additionally have the ability to define or influence database objects (operators, domain casts, or view subqueries) that the masking engine will evaluate - typically requiring CREATE privilege on at least one schema visible to the masking engine. The extension's masking mechanism must evaluate these objects in an elevated security context (security-definer or extension-owner context) for the privilege escalation to occur. Exploitation is constrained to deployments running PostgreSQL Anonymizer below version 3.1.4; environments that have never installed the extension are unaffected. There is no user-interaction requirement and no special network position is needed beyond the ability to connect to the PostgreSQL instance. |
| Impact | The CVSS 3.1 vector AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H scores 8.8, reflecting that any authenticated masked user on a reachable PostgreSQL instance can exploit this without special configuration beyond having the extension enabled. Real-world risk is elevated by several factors: the extension is explicitly deployed to enforce access controls for sensitive or regulated data (GDPR, HIPAA use cases), so exploitation directly undermines the security control the extension is meant to provide. The EPSS score is not provided in the input and cannot be assessed, but the attack complexity is low and the privilege requirement is only a basic database account. No CISA KEV listing exists and no public proof-of-concept is referenced, which slightly moderates immediate urgency. However, the scope metric in the provided vector (S:U) may understate impact: because the masked user's authorization scope is explicitly constrained by design and the exploit elevates them to the extension owner's security context, a scope change (S:C) is a reasonable interpretation, which would push the vector to a critical rating. The fix version is confirmed (3.1.4), making patching the unambiguous remediation priority. Organizations that cannot patch immediately face material risk since workarounds are limited. |
| Exploit ScenarioDerived | An authenticated masked PostgreSQL user - for example, a database account with access to anonymized HR data - creates a custom operator or domain cast whose implementation contains malicious SQL such as a SECURITY DEFINER function call or a COPY FROM PROGRAM invocation. When the PostgreSQL Anonymizer masking engine evaluates the masked user's query and resolves masking rules, it invokes the malicious expression in an elevated security context, granting the attacker superuser-level database access and potential OS command execution. No public proof-of-concept is referenced in the available data. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 06, 2026
Privilege escalation and arbitrary code execution in PostgreSQL Anonymizer (by Dalibo) allow authenticated masked users to break out of their restricted data-access context by embedding malicious expressions inside operators, domain casts, or view subqueries. When the extension's masking engine evaluates these objects during data anonymization, the embedded code runs with the elevated privileges of the extension owner or superuser, granting full database compromise from a nominally low-privilege account. No public exploit or KEV listing is recorded at time of analysis, but the CVSS score of 8.8 and the availability of a confirmed patch version make this a high-priority upgrade for any deployment relying on PostgreSQL Anonymizer for compliance or access control.
RemediationAI
Upgrade to PostgreSQL Anonymizer version 3.1.4 or later, which contains the confirmed vendor fix per the issue description. The package is distributed via PGXN and the Dalibo GitLab repository at https://gitlab.com/dalibo/postgresql_anonymizer. If immediate upgrade is not possible, a targeted compensating control is to revoke or tightly restrict masked users' ability to CREATE or REPLACE operators, domain casts, and views in any schema evaluated by the masking engine - specifically, ensure no masked user has CREATE privilege on pg_catalog or any schema where masking rules are resolved. Additionally, auditing existing operators and views for unexpected or untrusted function bodies before the patch can be applied reduces the window of exposure. These controls carry the trade-off of potentially breaking legitimate use cases if masked users are intended to have object-creation rights. There is no indication of a workaround that fully mitigates the flaw without either restricting privileges or upgrading.
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 developed by Dalibo that implements transparent data masking: designated 'masked' database users see anonymized values rather than real sensitive data. The extension enforces masking rules by rewriting queries or wrapping column references in masking functions evaluated within an elevated security context (typically a security-definer function running as the extension owner). The root cause (nominally CWE-89, but more precisely an expression injection / CWE-94 variant within SQL) is that the masking engine accepts user-influenceable database objects - custom operators, domain casts, or view subqueries - and evaluates their bodies inside this elevated context without sufficient isolation or trust-level verification. A masked user who can define or influence such objects can therefore inject arbitrary SQL or PL/pgSQL code that executes with superuser-equivalent rights. Because PostgreSQL's COPY FROM PROGRAM and similar features are available to superusers, OS-level command execution may follow from database-level privilege escalation.
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:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Masked user's authorization scope is explicitly constrained by design; gaining extension-owner privileges constitutes a scope change (S:C), raising severity beyond the provided vector.
Primary rating from Vendor (PostgreSQL).
CVSS VectorVendor: PostgreSQL
Lifecycle Timeline
2DescriptionCVE.org
PostgreSQL Anonymizer contains a vulnerability that allows unprivileged masked users to execute arbitrary code by abusing operators, domain casts, or view subqueries that carry untrusted expressions. When these objects are evaluated in the context of the extension’s masking mechanisms, the malicious code can run with elevated privileges. The issue is fixed in PostgreSQL Anonymizer 3.1.4 and later versions
Executive ViewAI
PostgreSQL Anonymizer, a key database masking tool for regulated environments, contains a critical privilege escalation vulnerability allowing attackers to achieve arbitrary code execution and full database compromise. Organizations using this extension for compliance with data protection regulations (GDPR, HIPAA, PCI-DSS) face a complete failure of their data access controls, requiring immediate mitigation.
No vendor-released patch identified at time of analysis. Interim mitigations include: disabling the PostgreSQL Anonymizer extension if operationally feasible; implementing database activity monitoring to detect unusual operator, domain, or view creation; restricting user permissions to prevent creation of these objects; isolating affected database systems from less-critical applications until patched.
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.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
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-72141
GHSA-m3j4-9g8h-24qh
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB