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
7DescriptionNVD
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
AnalysisAI
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.
Technical ContextAI
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.
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.
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
Same weakness CWE-89 – SQL Injection
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-36266
GHSA-g5vm-7gwv-45rj