CVE-2024-0985: Late privilege drop in REFRESH MATERIALIZED VIEW CONCURRENTLY in PostgreSQL allows an object creator to execute arbitrary SQL functions as the command issuer.
High CVSS 8.0
- CVE id
- CVE-2024-0985
- Published
- Last modified
Affected packages
| Package | Affected versions | Fixed in |
|---|---|---|
| PostgreSQL Runtimes and servers |
>= 12.0, < 12.18 >= 13.0, < 13.14 >= 14.0, < 14.11 >= 15.0, < 15.6 |
12.18, 13.14, 14.11, 15.6 |
How to fix it
Upgrade PostgreSQL to the fixed release of the line you run: 12.18, 13.14, 14.11, 15.6.
psql -c 'SELECT version();'
- Install the patched PostgreSQL minor release of your major version (the postgres image tag, the PGDG packages, or your provider's maintenance update) and restart the server; minor releases need no dump or pg_upgrade.
A free AIssue account reads the runtime versions your repositories pin (version files, Dockerfiles, build files) and tells you when one is affected.
Details
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.
References
- CVE-2024-0985 on the NVD
- Advisory: https://nvd.nist.gov/vuln/detail/CVE-2024-0985
- Web: https://lists.debian.org/debian-lts-announce/2024/03/msg00017.html
- Web: https://saites.dev/projects/personal/postgres-cve-2024-0985/
- Web: https://www.postgresql.org/support/security/CVE-2024-0985/
- Web: 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://www.postgresql.org/support/security/CVE-2024-0985/
Am I affected?
Upload or paste your lockfile. We check every package version in it against OSV.dev, this advisory included, and email you the vulnerable ones with the version that fixes them. Free, and no account needed.
About this data
Source: National Vulnerability Database (NVD) (public domain). Severity comes from the advisory's own rating when it has one, else from its CVSS score.