CVE-2024-2338

SQL Injection in PostgreSQL Anonymizer 1.2 allows table owner to gain superuser privileges via masking rule

Description

PostgreSQL Anonymizer v1.2 contains a SQL injection vulnerability that allows a user who owns a table to elevate to superuser when dynamic masking is enabled. PostgreSQL Anonymizer enables users to set security labels on tables to mask specified columns. There is a flaw that allows complex expressions to be provided as a value. This expression is then later used as it to create the masked views leading to SQL Injection. If dynamic masking is enabled, this will lead to privilege escalation to superuser after the label is created. Users that don't own a table, especially masked users cannot exploit this vulnerability. The problem is resolved in v1.3.

Remediation

Workaround:

  • Disable dynamic masking

Category

8.0
CVSS
Severity: High
CVSS 3.1 •
EPSS 0.03%
Affected: DALIBO PostgreSQL Anonymizer
Published at:
Updated at:

References

Frequently Asked Questions

What is the severity of CVE-2024-2338?
CVE-2024-2338 has been scored as a high severity vulnerability.
How to fix CVE-2024-2338?
As a workaround for remediating CVE-2024-2338: Disable dynamic masking
Is CVE-2024-2338 being actively exploited in the wild?
As for now, there are no information to confirm that CVE-2024-2338 is being actively exploited. According to its EPSS score, there is a ~0% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2024-2338?
CVE-2024-2338 affects DALIBO PostgreSQL Anonymizer.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.