# CVE-2024-2339: Improper Input Validation in PostgreSQL Anonymizer 1.2 allows table owner to gain superuser privileges via masking rule

- Severity: High 8.0 (CVSS:3.1, scored by PostgreSQL) `CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.55%, higher than 47% of CVEs (2026-12-01)
- Published: 2024-03-08T20:07:14.838Z
- Modified: 2026-06-17T07:24:20.793Z
- Weaknesses: CWE-20
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: PostgreSQL

## Description

PostgreSQL Anonymizer v1.2 contains a vulnerability  that allows a user who owns a table to elevate to superuser. A user can define a masking function for a column and place malicious code in that function. When a privileged user applies the masking rules using the static masking or the anonymous dump method, the malicious code is executed and can grant escalated privileges to the malicious user. PostgreSQL Anonymizer v1.2 does provide a protection against this risk with the restrict_to_trusted_schemas option, but that protection is incomplete. Users that don't own a table, especially masked users cannot exploit this vulnerability. The problem is resolved in v1.3.

(As written by CVE List.)

## Affected

- DALIBO PostgreSQL Anonymizer: from 1 before 1.3.0
- dalibo postgresql_anonymizer: from 1 before 1.3.0
- dalibo anonymizer: 1.2.0

## Every score

- PostgreSQL: CVSS:3.1 8.0 High `CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H`
- NVD: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://gitlab.com/dalibo/postgresql_anonymizer/-/commit/e517b38e62e50871b04011598e73a7308bdae9d9> (patch)

## Sources

- CVE List: [CVE-2024-2339](https://www.cve.org/CVERecord?id=CVE-2024-2339), CVE Terms of Use, modified 2024-08-02
- NVD: [CVE-2024-2339](https://nvd.nist.gov/vuln/detail/CVE-2024-2339), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-2339 · Whole record: https://cve.day/CVE-2024-2339.json · Rebuilt by cve.day 2026-11-25T22:58:37.375Z
