CVE-2024-0985: PostgreSQL - SQL Injection
- Cve: CVE-2024-0985
- Name: PostgreSQL - SQL Injection
- 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.
- Impact: Attackers can execute arbitrary SQL functions with the victim's privileges, potentially leading to privilege escalation or data compromise.
- Remediation: Update to PostgreSQL 16.2, 15.6, 14.11, 13.14, or 12.18 or later versions.
- Vulnerability type: sql_injection
- Vulnerability impact: privilege_escalation
- Requirement type: user_interaction
- Requirements: Victim needs to run REFRESH MATERIALIZED VIEW CONCURRENTLY on malicious view
- Labels source: projectdiscovery
- Severity: high
- Cvss score: 8
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
- Epss score: 0.01808
- Epss percentile: 0.79029
- Assignee: f86ef6dc-4d3a-42ad-8f28-e6d5547a5007
- Published at: 2024-02-08T13:15:08Z
- Age in days: 1020
- Modified at: 2026-06-17T06:54:42Z
- Patch available: yes
- References total: 4
- Products total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2024-0985
- Nvd status: modified
- Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, oss, projects total, projects, rejected by nvd
Cwe
| Id | Name |
|---|---|
| CWE-271 | Privilege Dropping / Lowering Errors |
| NVD-CWE-noinfo | — |
Hackerone
- Reports: 1
- Rank: 5211
References
Same in every row:
- Source: nvd
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| postgresql:postgresql | >= 15.0, < 15.6; >= 14.0, < 14.11; >= 13.0, < 13.14; >= 12.0, < 12.18 | no | nvd | /v1/products/postgresql/postgresql |
Index
- Checked, none or zero: repositories, repositories high signal, packages
Exploitation
- Remote: yes
- Authentication required: yes
- Hackerone reports: 1
- Exposed hosts: 217768
- Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access
- Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since