CVE-2024-0985

PostgreSQL non-owner REFRESH MATERIALIZED VIEW CONCURRENTLY executes arbitrary SQL

HIGH
8
CVSS Score
Published: February 8, 2024 at 01:00 PM UTC
Updated: June 17, 2026 at 06:54 AM UTC
1 product affected across 1 vendorPostgreSQL

Using PostgreSQL by N/A?

Get instant alerts when new vulnerabilities affect PostgreSQL - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH8
Exploit prediction
EPSS 2%
SSVC
No known exploit

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 12.1812.0 ≤ v < 12.1813 ≤ v < 13.1413.0 ≤ v < 13.1414 ≤ v < 14.1114.0 ≤ v < 14.1115 ≤ v < 15.615.0 ≤ v < 15.616 ≤ v < 16.213141516
Affected range stops below 12.18, so it looks safe — our inference, not a vendor statement
Affected range stops below 13.14, so it looks safe — our inference, not a vendor statement
Affected range stops below 14.11, so it looks safe — our inference, not a vendor statement
Affected range stops below 15.6, so it looks safe — our inference, not a vendor statement
Affected range stops below 16.2, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

References (4)

Source: f86ef6dc-4d3a-42ad-8f28-e6d5547a5007
https://lists.debian.org/debian-lts-announce/2024/03/msg00017.html
Source: f86ef6dc-4d3a-42ad-8f28-e6d5547a5007
https://saites.dev/projects/personal/postgres-cve-2024-0985/
Vendor Advisory
Source: f86ef6dc-4d3a-42ad-8f28-e6d5547a5007
https://www.postgresql.org/support/security/CVE-2024-0985/
Source: af854a3a-2127-422b-91ae-364da2661108
https://security.netapp.com/advisory/ntap-20241220-0005/

SSVC — Action Prioritization

SSVCNo known exploitNot automatableTotal impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

8HIGHPostgreSQL
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-271NVD-CWE-noinfo

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card