CVE-2024-0985

NameCVE-2024-0985
DescriptionLate 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.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)
ReferencesDLA-3764-1, DSA-5622-1, DSA-5623-1

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
postgresql-13 (PTS)bullseye13.15-0+deb11u1fixed
bullseye (security)13.14-0+deb11u1fixed
postgresql-15 (PTS)bookworm15.7-0+deb12u1fixed
bookworm (security)15.6-0+deb12u1fixed
postgresql-16 (PTS)sid, trixie16.3-1fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
postgresql-11sourcebuster11.22-0+deb10u2DLA-3764-1
postgresql-11source(unstable)(unfixed)
postgresql-13sourcebullseye13.14-0+deb11u1DSA-5622-1
postgresql-13source(unstable)(unfixed)
postgresql-15sourcebookworm15.6-0+deb12u1DSA-5623-1
postgresql-15source(unstable)(unfixed)
postgresql-16source(unstable)16.2-1

Notes

https://github.com/google/security-research/security/advisories/GHSA-9984-7hcf-v553
https://www.postgresql.org/support/security/CVE-2024-0985/
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=d6a61cb3bef3c8fbc35c2a6182e75a8c1d351e41 (REL_16_2)
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=f2fdea198b3d0ab30b9e8478a762488ecebabd88 (REL_15_6)
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=d541ce3b6f0582723150f45d52eab119985d3c19 (REL_13_14)
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=2699fc035a75d0774c1f013e9320882287f78adb (REL_12_18)
Commits have wrong CVE mentioned but the correct one is CVE-2024-0985

Search for package or bug name: Reporting problems