CVE-2024-0985
PostgreSQL Role Escalation via REFRESH MATERIALIZED VIEW CONCURRENTLY
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.
INFO
Published Date :
Feb. 8, 2024, 1:15 p.m.
Last Modified :
July 10, 2024, 6:15 p.m.
Source :
f86ef6dc-4d3a-42ad-8f28-e6d5547a5007
Remotely Exploitable :
Yes !
Impact Score :
5.9
Exploitability Score :
2.1
Public PoC/Exploit Available at Github
CVE-2024-0985 has a 2 public PoC/Exploit
available at Github.
Go to the Public Exploits
tab to see the list.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2024-0985
.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Ini adalah repository kumpulan CVE v.5
allcve cve cvelist newcve
Helm chart for MarkLogic Server
Smarty Makefile Go Mustache Shell
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2024-0985
vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2024-0985
vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Modified by f86ef6dc-4d3a-42ad-8f28-e6d5547a5007
Jul. 10, 2024
Action Type Old Value New Value Added Reference PostgreSQL https://saites.dev/projects/personal/postgres-cve-2024-0985/ [No types assigned] -
CVE Modified by f86ef6dc-4d3a-42ad-8f28-e6d5547a5007
Jun. 20, 2024
Action Type Old Value New Value Changed 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. As part of exploiting this vulnerability, the attacker creates functions that use CREATE RULE to convert the internally-built temporary table to a view. Versions before PostgreSQL 15.6, 14.11, 13.14, and 12.18 are affected. The only known exploit does not work in PostgreSQL 16 and later. For defense in depth, PostgreSQL 16.2 adds the protections that older branches are using to fix their vulnerability. 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. -
CVE Modified by f86ef6dc-4d3a-42ad-8f28-e6d5547a5007
May. 14, 2024
Action Type Old Value New Value -
CVE Modified by f86ef6dc-4d3a-42ad-8f28-e6d5547a5007
Mar. 18, 2024
Action Type Old Value New Value Added Reference PostgreSQL https://lists.debian.org/debian-lts-announce/2024/03/msg00017.html [No types assigned] -
Initial Analysis by [email protected]
Feb. 15, 2024
Action Type Old Value New Value Added CVSS V3.1 NIST AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H Changed Reference Type https://www.postgresql.org/support/security/CVE-2024-0985/ No Types Assigned https://www.postgresql.org/support/security/CVE-2024-0985/ Vendor Advisory Added CWE NIST NVD-CWE-noinfo Added CPE Configuration OR *cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:* versions from (including) 12.0 up to (excluding) 12.18 *cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:* versions from (including) 13.0 up to (excluding) 13.14 *cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:* versions from (including) 14.0 up to (excluding) 14.11 *cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:* versions from (including) 15.0 up to (excluding) 15.6 -
CVE Received by f86ef6dc-4d3a-42ad-8f28-e6d5547a5007
Feb. 08, 2024
Action Type Old Value New Value Added 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. As part of exploiting this vulnerability, the attacker creates functions that use CREATE RULE to convert the internally-built temporary table to a view. Versions before PostgreSQL 15.6, 14.11, 13.14, and 12.18 are affected. The only known exploit does not work in PostgreSQL 16 and later. For defense in depth, PostgreSQL 16.2 adds the protections that older branches are using to fix their vulnerability. Added Reference PostgreSQL https://www.postgresql.org/support/security/CVE-2024-0985/ [No types assigned] Added CWE PostgreSQL CWE-271 Added CVSS V3.1 PostgreSQL AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2024-0985
is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2024-0985
weaknesses.
Exploit Prediction
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.
0.06 }} 0.01%
score
0.26148
percentile