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, ELA-1060-1, ELA-1061-1

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
postgresql-11 (PTS)buster, buster (lts)11.22-0+deb10u3fixed
buster (security)11.22-0+deb10u2fixed
postgresql-13 (PTS)bullseye13.16-0+deb11u1fixed
bullseye (security)13.18-0+deb11u1fixed
postgresql-15 (PTS)bookworm15.8-0+deb12u1fixed
bookworm (security)15.10-0+deb12u1fixed
postgresql-16 (PTS)sid, trixie16.4-3fixed
postgresql-9.4 (PTS)jessie, jessie (lts)9.4.26-0+deb8u10fixed
postgresql-9.6 (PTS)stretch (security)9.6.24-0+deb9u1vulnerable
stretch (lts), stretch9.6.24-0+deb9u7fixed

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
postgresql-9.4sourcejessie9.4.26-0+deb8u9ELA-1061-1
postgresql-9.4source(unstable)(unfixed)
postgresql-9.6sourcestretch9.6.24-0+deb9u6ELA-1060-1
postgresql-9.6source(unstable)(unfixed)

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