Skip to content
OpenAdvisories

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.

Affected products

VendorProductAffectedFixed
— PostgreSQL 16 – < 16.2, 15 – < 15.6, 14 – < 14.11, 13 – < 13.14, < 12.18 16.2

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 12 postgresql-15 15.6-0+deb12u1 DSA-5623-1
Debian 11 postgresql-13 13.14-0+deb11u1 DSA-5622-1
Debian 10 postgresql-11 11.22-0+deb10u2 DLA-3764-1
ReleasePackageFixed inAdvisory
Ubuntu 24.04 LTS postgresql-16 16.2-1 —
Ubuntu 22.04 LTS postgresql-14 14.11-0ubuntu0.22.04.1 USN-6656-1
Ubuntu 20.04 LTS postgresql-12 12.18-0ubuntu0.20.04.1 USN-6656-1
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 18.04 LTS postgresql-10 No fix yet —
Ubuntu Pro 16.04 LTS postgresql-9.5 9.5.25-0ubuntu0.16.04.1+esm7 USN-6656-2
Ubuntu Pro 14.04 LTS postgresql-9.3 No fix yet —
ReleasePackageFixed inAdvisory
RHEL 9 pg_repack 1.4.8-1.module+el9.2.0+17405+aeb9ec60 RHSA-2024:0950
RHEL 9 pgaudit 1.7.0-1.module+el9.2.0+17405+aeb9ec60 RHSA-2024:0950
RHEL 9 postgres-decoderbufs 1.9.7-1.Final.module+el9.2.0+17405+aeb9ec60 RHSA-2024:0950
RHEL 9 postgresql +13 13.14-1.el9_3 RHSA-2024:0951, RHSA-2024:0950
RHEL 9 postgresql-test-rpm-macros 15.6-1.module+el9.3.0+21283+b0ea34b6 RHSA-2024:0950
RHEL 8 pg_repack 1.4.6-3.module+el8.9.0+19330+c97ddbdf RHSA-2024:0975, RHSA-2024:0974, RHSA-2024:0973
RHEL 8 pgaudit 1.4.0-7.module+el8.9.0+21289+7c796f9d RHSA-2024:0975, RHSA-2024:0974, RHSA-2024:0973
RHEL 8 postgres-decoderbufs 0.10.0-2.module+el8.9.0+19330+c97ddbdf RHSA-2024:0975, RHSA-2024:0974, RHSA-2024:0973
RHEL 8 postgresql +12 10.23-4.module+el8.9.0+21317+d2c6bf8a RHSA-2024:0975, RHSA-2024:0974, RHSA-2024:0973
RHEL 8 postgresql-private-libs +1 15.6-1.module+el8.9.0+21287+d0eecfe6 RHSA-2024:0973
RHEL 3 rh-postgresql10-postgresql +13 10.23-3.el7 RHSA-2024:0992
RHEL 3 rh-postgresql12-postgresql +13 12.18-1.el7 RHSA-2024:0990
RHEL 3 rh-postgresql13-postgresql +14 13.14-1.el7 RHSA-2024:0988
Show 10 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
RHEL 9.2 EUS pg_repack 1.4.8-1.module+el9.2.0+17405+aeb9ec60 RHSA-2024:1314
RHEL 9.2 EUS pgaudit 1.7.0-1.module+el9.2.0+17405+aeb9ec60 RHSA-2024:1314
RHEL 9.2 EUS postgres-decoderbufs 1.9.7-1.Final.module+el9.2.0+17405+aeb9ec60 RHSA-2024:1314
RHEL 9.2 EUS postgresql +13 13.14-1.el9_2 RHSA-2024:1314, RHSA-2024:1241
RHEL 9.2 EUS postgresql-test-rpm-macros 15.6-1.module+el9.2.0+21314+f2361d6d RHSA-2024:1314
RHEL 9.0 EUS postgresql +10 13.14-1.el9_0 RHSA-2024:1240
RHEL 8.8 EUS pg_repack 1.4.6-3.module+el8.5.0+11354+78b3c9c5 RHSA-2024:1426, RHSA-2024:1069, RHSA-2024:1017
RHEL 8.8 EUS pgaudit 1.4.0-5.module+el8.5.0+11354+78b3c9c5 RHSA-2024:1426, RHSA-2024:1069, RHSA-2024:1017
RHEL 8.8 EUS postgres-decoderbufs 0.10.0-2.module+el8.4.0+8873+b821c30a RHSA-2024:1426, RHSA-2024:1069, RHSA-2024:1017
RHEL 8.8 EUS postgresql +12 10.23-4.module+el8.8.0+21372+7f1ca650 RHSA-2024:1428, RHSA-2024:1426, RHSA-2024:1069
RHEL 8.8 EUS postgresql-private-libs +1 15.6-1.module+el8.8.0+21343+fedbca97 RHSA-2024:1017
RHEL 8.6 EUS pg_repack 1.4.6-3.module+el8.5.0+11354+78b3c9c5 RHSA-2024:1315, RHSA-2024:1070
RHEL 8.6 EUS pgaudit 1.4.0-5.module+el8.5.0+11354+78b3c9c5 RHSA-2024:1315, RHSA-2024:1070
RHEL 8.6 EUS postgres-decoderbufs 0.10.0-2.module+el8.4.0+8873+b821c30a RHSA-2024:1315, RHSA-2024:1070
RHEL 8.6 EUS postgresql +12 10.21-4.module+el8.6.0+21345+167dd12c RHSA-2024:1348, RHSA-2024:1315, RHSA-2024:1070
RHEL 8.4 TUS pgaudit 1.4.0-6.module+el8.4.0+11288+c193d6d7 RHSA-2024:1437, RHSA-2024:1195
RHEL 8.4 TUS postgres-decoderbufs 0.10.0-2.module+el8.4.0+8873+b821c30a RHSA-2024:1437, RHSA-2024:1195
RHEL 8.4 TUS postgresql +12 10.21-4.module+el8.4.0+21369+5e83297f RHSA-2024:1437, RHSA-2024:1429, RHSA-2024:1195
RHEL 8.4 E4S pgaudit 1.4.0-6.module+el8.4.0+11288+c193d6d7 RHSA-2024:1437, RHSA-2024:1195
RHEL 8.4 E4S postgres-decoderbufs 0.10.0-2.module+el8.4.0+8873+b821c30a RHSA-2024:1437, RHSA-2024:1195
RHEL 8.4 E4S postgresql +12 10.21-4.module+el8.4.0+21369+5e83297f RHSA-2024:1437, RHSA-2024:1429, RHSA-2024:1195
RHEL 8.4 AUS pgaudit 1.4.0-6.module+el8.4.0+11288+c193d6d7 RHSA-2024:1437, RHSA-2024:1195
RHEL 8.4 AUS postgres-decoderbufs 0.10.0-2.module+el8.4.0+8873+b821c30a RHSA-2024:1437, RHSA-2024:1195
RHEL 8.4 AUS postgresql +12 10.21-4.module+el8.4.0+21369+5e83297f RHSA-2024:1437, RHSA-2024:1429, RHSA-2024:1195
RHEL 8.2 TUS pgaudit 1.4.0-4.module+el8.2.0+9043+1dbb5661 RHSA-2024:1071
RHEL 8.2 TUS postgres-decoderbufs 0.10.0-2.module+el8.2.0+9043+1dbb5661 RHSA-2024:1071
RHEL 8.2 TUS postgresql +12 10.21-4.module+el8.2.0+21384+f73fb27d RHSA-2024:1422, RHSA-2024:1071
RHEL 8.2 E4S pgaudit 1.4.0-4.module+el8.2.0+9043+1dbb5661 RHSA-2024:1071
RHEL 8.2 E4S postgres-decoderbufs 0.10.0-2.module+el8.2.0+9043+1dbb5661 RHSA-2024:1071
RHEL 8.2 E4S postgresql +12 10.21-4.module+el8.2.0+21384+f73fb27d RHSA-2024:1422, RHSA-2024:1071
RHEL 8.2 AUS pgaudit 1.4.0-4.module+el8.2.0+9043+1dbb5661 RHSA-2024:1071
RHEL 8.2 AUS postgres-decoderbufs 0.10.0-2.module+el8.2.0+9043+1dbb5661 RHSA-2024:1071
RHEL 8.2 AUS postgresql +12 10.21-4.module+el8.2.0+21384+f73fb27d RHSA-2024:1422, RHSA-2024:1071

AlmaLinux

Errata ↗
ReleasePackageFixed inAdvisory
AlmaLinux 9 pg_repack 1.4.8-1.module_el9.2.0+22+09653793 ALSA-2024:0950
AlmaLinux 9 pgaudit 1.7.0-1.module_el9.2.0+22+09653793 ALSA-2024:0950
AlmaLinux 9 postgres-decoderbufs 1.9.7-1.Final.module_el9.2.0+22+09653793 ALSA-2024:0950
AlmaLinux 9 postgresql +13 13.14-1.el9_3 ALSA-2024:0951, ALSA-2024:0950
AlmaLinux 9 postgresql-test-rpm-macros 15.6-1.module_el9.3.0+55+d62f4779 ALSA-2024:0950
AlmaLinux 8 pg_repack 1.4.6-3.module_el8.6.0+2758+4f4474df ALSA-2024:0975, ALSA-2024:0974, ALSA-2024:0973
AlmaLinux 8 pgaudit 1.4.0-7.module_el8.9.0+3740+0e74851f.alma.1 ALSA-2024:0975, ALSA-2024:0974, ALSA-2024:0973
AlmaLinux 8 postgres-decoderbufs 0.10.0-2.module_el8.6.0+2758+4f4474df ALSA-2024:0975, ALSA-2024:0974, ALSA-2024:0973
AlmaLinux 8 postgresql +12 10.23-4.module_el8.9.0+3736+952d0ed7.alma.1 ALSA-2024:0975, ALSA-2024:0974, ALSA-2024:0973
AlmaLinux 8 postgresql-private-libs +1 15.6-1.module_el8.9.0+3739+514705ed.alma.1 ALSA-2024:0973

Rocky Linux

Errata ↗
ReleasePackageFixed inAdvisory
Rocky Linux 9 pgaudit 1.7.0-1.module+el9.5.0+30637+4391fcca RLSA-2024:0950
Rocky Linux 9 postgres-decoderbufs 1.9.7-1.Final.module+el9.5.0+30637+4391fcca RLSA-2024:0950
Rocky Linux 9 postgresql 13.14-1.el9_3 RLSA-2024:0951
Rocky Linux 8 pg_repack 1.4.6-3.module+el8.9.0+1594+4a6adae9 RLSA-2024:0975, RLSA-2024:0974, RLSA-2024:0973
Rocky Linux 8 pgaudit 1.4.0-7.module+el8.9.0+1735+a332307b RLSA-2024:0975, RLSA-2024:0974, RLSA-2024:0973
Rocky Linux 8 postgres-decoderbufs 0.10.0-2.module+el8.9.0+1594+4a6adae9 RLSA-2024:0975, RLSA-2024:0974, RLSA-2024:0973
Rocky Linux 8 postgresql 10.23-4.module+el8.9.0+1734+74bd286c RLSA-2024:0975, RLSA-2024:0974, RLSA-2024:0973
ReleasePackageFixed inAdvisory
SLES 15 SP5 postgresql14 14.11-150200.5.39.1 SUSE-SU-2024:0552-1
SLES 15 SP5 postgresql15 15.6-150200.5.22.1 SUSE-SU-2024:0551-1
SLES 15 SP5 postgresql16 16.2-150200.5.10.1 SUSE-SU-2024:0550-1
SLES 15 SP4 postgresql13 13.14-150200.5.53.1 SUSE-SU-2024:0522-1
SLES 15 SP4 postgresql14 14.11-150200.5.39.1 SUSE-SU-2024:0552-1
SLES 15 SP4 postgresql15 15.6-150200.5.22.1 SUSE-SU-2024:0551-1
SLES 15 SP4 postgresql16 16.2-150200.5.10.1 SUSE-SU-2024:0550-1
SLES 15 SP3 postgresql12 12.18-150200.8.57.1 SUSE-SU-2024:0523-1
SLES 15 SP3 postgresql13 13.14-150200.5.53.1 SUSE-SU-2024:0522-1
SLES 15 SP3 postgresql14 14.11-150200.5.39.1 SUSE-SU-2024:0552-1
SLES 15 SP3 postgresql15 15.6-150200.5.22.1 SUSE-SU-2024:0551-1
SLES 15 SP3 postgresql16 16.2-150200.5.10.1 SUSE-SU-2024:0550-1
SLES 15 SP2 postgresql12 12.18-150200.8.57.1 SUSE-SU-2024:0523-1
SLES 15 SP2 postgresql13 13.14-150200.5.53.1 SUSE-SU-2024:0522-1
SLES 15 SP2 postgresql14 14.11-150200.5.39.1 SUSE-SU-2024:0552-1
SLES 15 SP2 postgresql16 16.2-150200.5.10.1 SUSE-SU-2024:0550-1
SLES 12 SP5 postgresql12 12.18-3.52.1 SUSE-SU-2024:0542-1
SLES 12 SP5 postgresql13 13.14-3.46.1 SUSE-SU-2024:0541-1
SLES 12 SP5 postgresql14 14.11-3.36.1 SUSE-SU-2024:0540-1
SLES 12 SP5 postgresql15 15.6-3.22.1 SUSE-SU-2024:0520-1
SLES 12 SP5 postgresql16 16.2-3.10.1 SUSE-SU-2024:0546-1
Show 10 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 15 SP4 postgresql13 13.14-150200.5.53.1 SUSE-SU-2024:0522-1
SLES for SAP 15 SP4 postgresql14 14.11-150200.5.39.1 SUSE-SU-2024:0552-1
SLES for SAP 15 SP4 postgresql15 15.6-150200.5.22.1 SUSE-SU-2024:0551-1
SLES for SAP 15 SP4 postgresql16 16.2-150200.5.10.1 SUSE-SU-2024:0550-1
SLES for SAP 15 SP3 postgresql12 12.18-150200.8.57.1 SUSE-SU-2024:0523-1
SLES for SAP 15 SP3 postgresql13 13.14-150200.5.53.1 SUSE-SU-2024:0522-1
SLES for SAP 15 SP3 postgresql14 14.11-150200.5.39.1 SUSE-SU-2024:0552-1
SLES for SAP 15 SP3 postgresql15 15.6-150200.5.22.1 SUSE-SU-2024:0551-1
SLES for SAP 15 SP3 postgresql16 16.2-150200.5.10.1 SUSE-SU-2024:0550-1
SLES for SAP 15 SP2 postgresql12 12.18-150200.8.57.1 SUSE-SU-2024:0523-1
SLES for SAP 15 SP2 postgresql13 13.14-150200.5.53.1 SUSE-SU-2024:0522-1
SLES for SAP 15 SP2 postgresql14 14.11-150200.5.39.1 SUSE-SU-2024:0552-1
SLES for SAP 15 SP2 postgresql16 16.2-150200.5.10.1 SUSE-SU-2024:0550-1
SLES for SAP 12 SP5 postgresql12 12.18-3.52.1 SUSE-SU-2024:0542-1
SLES for SAP 12 SP5 postgresql13 13.14-3.46.1 SUSE-SU-2024:0541-1
SLES for SAP 12 SP5 postgresql14 14.11-3.36.1 SUSE-SU-2024:0540-1
SLES for SAP 12 SP5 postgresql15 15.6-3.22.1 SUSE-SU-2024:0520-1
SLES for SAP 12 SP5 postgresql16 16.2-3.10.1 SUSE-SU-2024:0546-1
SLE HPC 15 SP4 postgresql13 13.14-150200.5.53.1 SUSE-SU-2024:0522-1
SLE HPC 15 SP4 postgresql14 14.11-150200.5.39.1 SUSE-SU-2024:0552-1
SLE HPC 15 SP4 postgresql15 15.6-150200.5.22.1 SUSE-SU-2024:0551-1
SLE HPC 15 SP4 postgresql16 16.2-150200.5.10.1 SUSE-SU-2024:0550-1
SLE HPC 15 SP3 postgresql12 12.18-150200.8.57.1 SUSE-SU-2024:0523-1
SLE HPC 15 SP3 postgresql13 13.14-150200.5.53.1 SUSE-SU-2024:0522-1
SLE HPC 15 SP3 postgresql14 14.11-150200.5.39.1 SUSE-SU-2024:0552-1
SLE HPC 15 SP3 postgresql15 15.6-150200.5.22.1 SUSE-SU-2024:0551-1
SLE HPC 15 SP3 postgresql16 16.2-150200.5.10.1 SUSE-SU-2024:0550-1
SLE HPC 15 SP2 postgresql12 12.18-150200.8.57.1 SUSE-SU-2024:0523-1
SLE HPC 15 SP2 postgresql13 13.14-150200.5.53.1 SUSE-SU-2024:0522-1
SLE HPC 15 SP2 postgresql14 14.11-150200.5.39.1 SUSE-SU-2024:0552-1
SLE HPC 15 SP2 postgresql16 16.2-150200.5.10.1 SUSE-SU-2024:0550-1
SUSE Manager Server 4.3 postgresql14 14.11-150200.5.39.1 SUSE-SU-2024:0552-1
SUSE Manager Server 4.3 postgresql15 15.6-150200.5.22.1 SUSE-SU-2024:0551-1
SUSE Manager Server 4.3 postgresql16 16.2-150200.5.10.1 SUSE-SU-2024:0550-1
SUSE Manager Proxy 4.3 postgresql14 14.11-150200.5.39.1 SUSE-SU-2024:0552-1
SUSE Manager Proxy 4.3 postgresql15 15.6-150200.5.22.1 SUSE-SU-2024:0551-1
SUSE Manager Proxy 4.3 postgresql16 16.2-150200.5.10.1 SUSE-SU-2024:0550-1
SUSE Enterprise Storage 7.1 postgresql12 12.18-150200.8.57.1 SUSE-SU-2024:0523-1
SUSE Enterprise Storage 7.1 postgresql13 13.14-150200.5.53.1 SUSE-SU-2024:0522-1
SUSE Enterprise Storage 7.1 postgresql14 14.11-150200.5.39.1 SUSE-SU-2024:0552-1
SUSE Enterprise Storage 7.1 postgresql15 15.6-150200.5.22.1 SUSE-SU-2024:0551-1
SUSE Enterprise Storage 7.1 postgresql16 16.2-150200.5.10.1 SUSE-SU-2024:0550-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed postgresql12 12.18-1.1 openSUSE-SU-2024:13668-1
openSUSE Tumbleweed postgresql13 13.14-1.1 openSUSE-SU-2024:13669-1
openSUSE Tumbleweed postgresql14 14.11-1.1 openSUSE-SU-2024:13670-1
openSUSE Tumbleweed postgresql15 15.6-1.1 openSUSE-SU-2024:13671-1
openSUSE Tumbleweed postgresql16 16.2-1.1 openSUSE-SU-2024:13672-1
openSUSE Tumbleweed postgresql17 17.6-2.1 openSUSE-SU-2025:15580-1
openSUSE Leap 15.5 postgresql12 12.18-150200.8.57.1 SUSE-SU-2024:0523-1
openSUSE Leap 15.5 postgresql13 13.14-150200.5.53.1 SUSE-SU-2024:0522-1
openSUSE Leap 15.5 postgresql14 14.11-150200.5.39.1 SUSE-SU-2024:0552-1
openSUSE Leap 15.5 postgresql15 15.6-150200.5.22.1 SUSE-SU-2024:0551-1
openSUSE Leap 15.5 postgresql16 +1 16.2-150200.5.10.1 SUSE-SU-2024:0550-1
ReleasePackageFixed inAdvisory
Alpine v3.24 postgresql16 16.2-r0 —
Alpine v3.23 postgresql16 16.2-r0 —
Alpine v3.22 postgresql15 15.6-r0 —
Alpine v3.22 postgresql16 16.2-r0 —
Alpine v3.21 postgresql15 15.6-r0 —
Alpine v3.21 postgresql16 16.2-r0 —
Alpine v3.20 postgresql14 14.11-r0 —
Alpine v3.20 postgresql15 15.6-r0 —
Alpine v3.20 postgresql16 16.2-r0 —
Show 4 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Alpine v3.19 postgresql13 13.14-r0 —
Alpine v3.19 postgresql14 14.11-r0 —
Alpine v3.19 postgresql15 15.6-r0 —
Alpine v3.19 postgresql16 16.2-r0 —
Alpine v3.18 postgresql12 12.18-r0 —
Alpine v3.18 postgresql13 13.14-r0 —
Alpine v3.18 postgresql14 14.11-r0 —
Alpine v3.18 postgresql15 15.6-r0 —
Alpine v3.17 postgresql12 12.18-r0 —
Alpine v3.17 postgresql13 13.14-r0 —
Alpine v3.17 postgresql14 14.11-r0 —
Alpine v3.17 postgresql15 15.6-r0 —
Alpine v3.16 postgresql12 12.18-r0 —
Alpine v3.16 postgresql13 13.14-r0 —
Alpine v3.16 postgresql14 14.11-r0 —

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 postgresql15 +15 15.6-1.amzn2023.0.1 ALAS2023-2024-547

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 postgresql 16.3-1 —
Azure Linux 2 (CBL-Mariner) postgresql 14.11-1 —

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 9 pg_repack 1.4.8-1.module+el9.2.0+21134+ceb95ed9 ELSA-2024-0950
Oracle Linux 9 pgaudit 1.7.0-1.module+el9.2.0+21134+ceb95ed9 ELSA-2024-0950
Oracle Linux 9 postgres-decoderbufs 1.9.7-1.Final.module+el9.2.0+21134+ceb95ed9 ELSA-2024-0950
Oracle Linux 9 postgresql +13 13.14-1.0.1.el9_3 ELSA-2024-0951, ELSA-2024-0950
Oracle Linux 9 postgresql-test-rpm-macros 15.6-1.module+el9.3.0+90158+dfcdadd2 ELSA-2024-0950
Oracle Linux 8 pg_repack 1.4.6-3.module+el8.9.0+90098+1560b6c2 ELSA-2024-0975, ELSA-2024-0974, ELSA-2024-0973
Oracle Linux 8 pgaudit 1.4.0-7.module+el8.9.0+90163+ce4271a0 ELSA-2024-0975, ELSA-2024-0974, ELSA-2024-0973
Oracle Linux 8 postgres-decoderbufs 0.10.0-2.module+el8.9.0+90098+1560b6c2 ELSA-2024-0975, ELSA-2024-0974, ELSA-2024-0973
Oracle Linux 8 postgresql +12 10.23-4.0.1.module+el8.9.0+90164+87901204 ELSA-2024-0975, ELSA-2024-0974, ELSA-2024-0973
Oracle Linux 8 postgresql-private-libs +1 15.6-1.module+el8.9.0+90160+417c9f54 ELSA-2024-0973

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling postgresql-12 12.18-r0 —
Wolfi rolling postgresql-13 13.14-r0 —
Wolfi rolling postgresql-14 14.11-r0 —
Wolfi rolling postgresql-15 15.6-r0 —

Advisories 50

References