CVE-2024-0985
HIGH8.0EPSS 0.75%PostgreSQL non-owner REFRESH MATERIALIZED VIEW CONCURRENTLY executes arbitrary SQL
Published: 2/8/2024Modified: 4/28/2026
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 packages (10)
- Alpine/postgresql13from 0, < 13.14-r0
- Alpine/postgresql14from 0, < 14.11-r0
- Alpine/postgresql15from 0, < 15.6-r0
- Alpine/postgresql16from 0, < 16.2-r0
- Bitnami/postgresql>= 12.0.0, < 12.18.0, >= 13.0.0, < 13.14.0, >= 14.0.0, < 14.11.0, >= 15.0.0, < 15.6.0
- Debian/postgresql-11from 0, < 11.22-0+deb10u2
- Debian/postgresql-13from 0, < 13.14-0+deb11u1
- Debian/postgresql-13from 0, < 13.14-0+deb11u1
- Debian/postgresql-15from 0, < 15.6-0+deb12u1
- Debian/postgresql-15from 0, < 15.6-0+deb12u1
CVSS scores
| Source | Version | Severity | Vector |
|---|---|---|---|
| osv | CVSS 3.1 | HIGH8.0 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H |
References (7)
- ADVISORYhttps://security.alpinelinux.org/vuln/CVE-2024-0985
- ADVISORYhttps://security-tracker.debian.org/tracker/CVE-2024-0985
- WEBhttps://lists.debian.org/debian-lts-announce/2024/03/msg00017.html
- WEBhttps://nvd.nist.gov/vuln/detail/CVE-2024-0985
- WEBhttps://saites.dev/projects/personal/postgres-cve-2024-0985/
- WEBhttps://security.netapp.com/advisory/ntap-20241220-0005/
- WEBhttps://www.postgresql.org/support/security/CVE-2024-0985/