Severity by source
AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
Network-accessible collection phase with no complexity beyond holding a masked role (PR:L); confidentiality-only, no integrity or availability impact; scope unchanged as recovery affects same database authorization boundary.
Primary rating from Vendor (PostgreSQL).
CVSS VectorVendor: PostgreSQL
Lifecycle Timeline
2DescriptionCVE.org
PostgreSQL Anonymizer contains a vulnerability that allows unprivileged masked users to repeatedly call the anon.hash() function and collects (seed, hash_output) pairs to perform an offline brute-force attack and deduce the salt. The problem is resolved in PostgreSQL Anonymizer 3.1.2 and later versions
AnalysisAI
PostgreSQL Anonymizer's anon.hash() function exposes its internal salt to masked database users through an offline brute-force attack, undermining the core pseudonymization guarantee of the extension. Masked roles - the primary consumer of this extension - can call anon.hash() with arbitrary seed inputs and accumulate (seed, hash_output) pairs to deduce the salt offline, after which all pseudonymized values in the database become reversible. No active exploitation or public proof-of-concept has been identified; a vendor-confirmed fix is available in version 3.1.2.
Technical ContextAI
PostgreSQL Anonymizer is a PostgreSQL extension by Dalibo (CPE: cpe:2.3:a:dalibo:postgresql_anonymizer:*:*:*:*:*:*:*:*) that provides declarative data masking and pseudonymization by applying keyed hash functions to sensitive columns. The anon.hash() function transforms values using a salt-seeded algorithm, with the salt acting as the secret that prevents reversal. CWE-328 (Use of Weak Hash) identifies the root cause class: the hash function's design or invocation mode permits an observer to reconstruct the secret salt by analyzing sufficient input/output pairs. Because masked roles are intentionally granted query access as part of normal extension usage, the data-collection phase requires no privilege escalation - it exploits a capability that is legitimately exposed to exactly the class of user the extension is meant to restrict. Once the salt is recovered offline, the attacker can reverse every pseudonymized value in the database using the same function.
RemediationAI
Upgrade to PostgreSQL Anonymizer 3.1.2 or later, the vendor-confirmed fix version per the description and GitLab issue https://gitlab.com/dalibo/postgresql_anonymizer/-/issues/649. After patching, rotate the anonymization salt immediately, since any (seed, hash_output) pairs collected by masked users prior to the upgrade remain usable offline to deduce the old salt and reverse historical pseudonymized data - rotation invalidates prior collection efforts. If immediate upgrade is not feasible, revoke or restrict direct execute permission on anon.hash() from masked roles at the PostgreSQL level using REVOKE EXECUTE ON FUNCTION anon.hash() FROM <masked_role>; note this may break masking workflows that depend on the function and should be tested in a non-production environment first. No additional vendor workarounds are documented in the available references.
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-328 – Use of Weak Hash
View allSame technique Information Disclosure
View allVendor StatusVendor
Share
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-40349
GHSA-8ch8-93q8-mhm3