4.2medium
PostgreSQL SET ROLE, SET SESSION AUTHORIZATION reset to wrong user ID
- Severity
- 4.2medium CVSS:3.1 by PostgreSQL
- Exploit likelihood
- 0.69% (higher than 54% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- PostgreSQL
- Also known as
- BIT-POSTGRESQL-2024-10978
Description
Incorrect privilege assignment in PostgreSQL allows a less-privileged application user to view or change different rows from those intended. An attack requires the application to use SET ROLE, SET SESSION AUTHORIZATION, or an equivalent feature. The problem arises when an application query uses parameters from the attacker or conveys query results to the attacker. If that query reacts to current_setting('role') or the current user ID, it may modify or return data as though the session had not used SET ROLE or SET SESSION AUTHORIZATION. The attacker does not control which incorrect user ID applies. Query text from less-privileged sources is not a concern here, because SET ROLE and SET SESSION AUTHORIZATION are not sandboxes for unvetted queries. Versions before PostgreSQL 17.1, 16.5, 15.9, 14.14, 13.17, and 12.21 are affected.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| PostgreSQL | from 17 before 17.1, from 16 before 16.5, from 15 before 15.9, from 14 before 14.14, from 13 before 13.17, before 12.21 | CVE List |
| postgresql postgresql | from 12.0 before 12.21, from 13.0 before 13.17, from 14.0 before 14.14, from 15.0 before 15.9, from 16.0 before 16.5, 17.0 | NVD |
| debian debian_linux | 11.0 | NVD |
| postgresql (Bitnami) | before 12.21.0, from 13.0.0 before 13.17.0, from 14.0.0 before 14.14.0, from 15.0.0 before 15.9.0, from 16.0.0 before 16.5.0, from 17.0.0 before 17.1.0 | Bitnami Vulnerability Database |
All scores
| PostgreSQL | 4.2medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N |
| NVD | 4.2medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N |
| Bitnami Vulnerability Database | medium rating |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
Incorrect privilege assignment in PostgreSQL allows a less-privileged application user to view or change different rows from those intended. An attack requires the application to use SET ROLE, SET SESSION AUTHORIZATION, or an equivalent feature. The problem arises when an application query uses parameters from the attacker or conveys query results to the attacker. If that query reacts to current_setting('role') or the current user ID, it may modify or return data as though the session had not used SET ROLE or SET SESSION AUTHORIZATION. The attacker does not control which incorrect user ID applies. Query text from less-privileged sources is not a concern here, because SET ROLE and SET SESSION AUTHORIZATION are not sandboxes for unvetted queries. Versions before PostgreSQL 17.1, 16.5, 15.9, 14.14, 13.17, and 12.21 are affected.
NVD (es)
La asignación incorrecta de privilegios en PostgreSQL permite que un usuario de la aplicación con menos privilegios vea o cambie filas distintas a las previstas. Un ataque requiere que la aplicación utilice SET ROLE, SET SESSION AUTHORIZATION o una función equivalente. El problema surge cuando una consulta de la aplicación utiliza parámetros del atacante o transmite los resultados de la consulta al atacante. Si esa consulta reacciona a current_setting('role') o al ID de usuario actual, puede modificar o devolver datos como si la sesión no hubiera utilizado SET ROLE o SET SESSION AUTHORIZATION. El atacante no controla qué ID de usuario incorrecto se aplica. El texto de la consulta de fuentes con menos privilegios no es un problema aquí, porque SET ROLE y SET SESSION AUTHORIZATION no son entornos aislados para consultas no verificadas. Las versiones anteriores a PostgreSQL 17.1, 16.5, 15.9, 14.14, 13.17 y 12.21 se ven afectadas.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-10978 changed 2025-11-03 | CVE Terms of Use |
| NVD | CVE-2024-10978 changed 2026-06-17 | Public domain |
| Bitnami Vulnerability Database | BIT-POSTGRESQL-2024-10978 changed 2026-09-08 | Apache-2.0 |