CVE-2024-2338
JSON

8.0high

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

Severity
8.0high CVSS:3.1 by PostgreSQL
Exploit likelihood
0.66% (higher than 46% of CVEs)
Published
Last changed
Assigned by
PostgreSQL

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.

Affected

Product or packageVersionsReported by
DALIBO PostgreSQL Anonymizerfrom 1 before 1.3.0CVE List
dalibo postgresql_anonymizerfrom 1 before 1.3.0CVE List
dalibo anonymizer1.2.0NVD

All scores

PostgreSQL8.0high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H
NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-89

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

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.

NVD (es)

PostgreSQL Anonymizer v1.2 contiene una vulnerabilidad de inyección SQL que permite a un usuario propietario de una tabla ascender a superusuario cuando el enmascaramiento dinámico está habilitado. PostgreSQL Anonymizer permite a los usuarios establecer etiquetas de seguridad en tablas para enmascarar columnas específicas. Existe una falla que permite proporcionar expresiones complejas como valor. Esta expresión luego se usa para crear las vistas enmascaradas que conducen a la inyección SQL. Si el enmascaramiento dinámico está habilitado, esto dará lugar a una escalada de privilegios al superusuario después de que se cree la etiqueta. Los usuarios que no poseen una mesa, especialmente los usuarios enmascarados, no pueden aprovechar esta vulnerabilidad. El problema se resuelve en v1.3.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-2338 changed 2024-08-01CVE Terms of Use
NVDCVE-2024-2338 changed 2026-06-17Public domain