PostgreSQL: Privilege Dropping / Lowering Errors
CVE-2024-0985 is a high-severity privilege dropping / lowering errors vulnerability in PostgreSQL, with a CVSS 3.1 base score of 8.0 out of 10. It can be exploited remotely over the network by an attacker with a low-privileged account, but only if a user takes part, for example by opening a link or file. The record lists versions 16.2, 15.6, 14.11 as the first without the flaw, so updating PostgreSQL to one of those releases or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 1.81% chance of exploitation within 30 days, higher than 79% of scored CVEs.
High severity with no evidence of exploitation so far.
What to do
- Update PostgreSQL to 16.2 or 15.6 or 14.11 or 13.14, whichever matches your release line, or a later version.
- Read the advisory on postgresql.org for workarounds and exact fixed builds.
- Because the attack needs a user to take part, warn users about unexpected links and files related to this product until it is patched.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| PostgreSQL | PostgreSQL | 16 up to, but not including, 16.2; 15 up to, but not including, 15.6; 14 up to, but not including, 14.11; 13 up to, but not including, 13.14; before 12.18 | 16.2, 15.6, 14.11, 13.14, 12.18 |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- LowA basic user account is enough.
- User interaction
- RequiredA user must take an action such as opening a file or link.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 8.0 | High | CNA |
| CVSS 3.1 | 8.0 | High | NVD |
Official description
Late privilege drop in REFRESH MATERIALIZED VIEW CONCURRENTLY in PostgreSQL allows an object creator to execute arbitrary SQL functions as the command issuer. The command intends to run SQL functions as the owner of the materialized view, enabling safe refresh of untrusted materialized views. The victim is a superuser or member of one of the attacker's roles. The attack requires luring the victim into running REFRESH MATERIALIZED VIEW CONCURRENTLY on the attacker's materialized view. Versions before PostgreSQL 16.2, 15.6, 14.11, 13.14, and 12.18 are affected.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Privilege Dropping / Lowering Errors
The product does not drop privileges before passing control of a resource to an actor that does not have those privileges.
How developers prevent this class of flaw
- Compartmentalize the system to have safe areas where trust boundaries can be unambiguously drawn. Do not allow sensitive data to go outside of the trust boundary and always be careful when interfacing with a compartment outside of the safe area. Ensure that appropriate compartmentalization is built into the system design, and the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.
- Very carefully manage the setting, management, and handling of privileges. Explicitly manage trust zones in the software.
- Consider following the principle of separation of privilege. Require multiple conditions to be met before permitting access to a system resource.
More Privilege Dropping / Lowering Errors vulnerabilities (CWE-271)
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Other references
Other vulnerabilities in PostgreSQL
- 7.2 High severity
- 8.8 High severity
- 8.8 High severity
- 8.1 High severity
- 7.2 High severity
- 8.8 High severity
Recent Privilege Dropping / Lowering Errors vulnerabilities
- 8.8 High severity
- 7.8 High severity
Spotted an error? Tell us.