CVE-2024-0985
PostgreSQL non-owner REFRESH MATERIALIZED VIEW CONCURRENTLY executes arbitrary SQL
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.
How to fix CVE-2024-0985
To remediate CVE-2024-0985, upgrade the affected package to a fixed version below.
- —upgrade to 13.14-r0 or later
- —upgrade to 14.11-r0 or later
- —upgrade to 15.6-r0 or later
- —upgrade to 16.2-r0 or later
- —upgrade to 12.18.0 or later
- —upgrade to 11.22-0+deb10u2 or later
- —upgrade to 13.14-0+deb11u1 or later
- —upgrade to 13.14-0+deb11u1 or later
- —upgrade to 15.6-0+deb12u1 or later
- —upgrade to 15.6-0+deb12u1 or later
Is CVE-2024-0985 being exploited?
Low — EPSS is 0.8%, meaning exploitation activity has not been observed at scale.
Affected packages (10)
- from 0, < 13.14-r0
- from 0, < 14.11-r0
- from 0, < 15.6-r0
- from 0, < 16.2-r0
- >= 12.0.0, < 12.18.0, >= 13.0.0, < 13.14.0, >= 14.0.0, < 14.11.0, >= 15.0.0, < 15.6.0
- from 0, < 11.22-0+deb10u2
- from 0, < 13.14-0+deb11u1
- from 0, < 13.14-0+deb11u1
- from 0, < 15.6-0+deb12u1
- from 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 |