# CVE-2024-0985: PostgreSQL non-owner REFRESH MATERIALIZED VIEW CONCURRENTLY executes arbitrary SQL

- Severity: High 8.0 (CVSS:3.1, scored by PostgreSQL) `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.81%, higher than 79% of CVEs (2026-12-01)
- Published: 2024-02-08T13:00:02.411Z
- Modified: 2026-09-08T08:48:24.789Z
- Also known as: BIT-POSTGRESQL-2024-0985
- Weaknesses: CWE-271
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: PostgreSQL

## 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.

(As written by CVE List.)

## Affected

- PostgreSQL: from 16 before 16.2; from 15 before 15.6; from 14 before 14.11; from 13 before 13.14; before 12.18
- postgresql postgresql: from 12.0 before 12.18; from 13.0 before 13.14; from 14.0 before 14.11; from 15.0 before 15.6
- postgresql (Bitnami): from 12.0.0 before 12.18.0; from 13.0.0 before 13.14.0; from 14.0.0 before 14.11.0; from 15.0.0 before 15.6.0

## Every score

- PostgreSQL: CVSS:3.1 8.0 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 8.0 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H`
- Bitnami Vulnerability Database: rating High

## References

- <https://www.postgresql.org/support/security/CVE-2024-0985/> (advisory, vendor-advisory)
- <https://lists.debian.org/debian-lts-announce/2024/03/msg00017.html> (web)
- <https://saites.dev/projects/personal/postgres-cve-2024-0985/> (web)
- <https://security.netapp.com/advisory/ntap-20241220-0005/> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-0985> (web)

## Sources

- CVE List: [CVE-2024-0985](https://www.cve.org/CVERecord?id=CVE-2024-0985), CVE Terms of Use, modified 2025-06-13
- NVD: [CVE-2024-0985](https://nvd.nist.gov/vuln/detail/CVE-2024-0985), Public domain, modified 2026-06-17
- Bitnami Vulnerability Database: [BIT-POSTGRESQL-2024-0985](https://osv.dev/vulnerability/BIT-POSTGRESQL-2024-0985), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2024-0985 · Whole record: https://cve.day/CVE-2024-0985.json · Rebuilt by cve.day 2026-11-25T22:58:36.670Z
