Skip to content
OpenAdvisories

Description

Incomplete tracking in PostgreSQL of tables with row security allows a reused query to view or change different rows from those intended. CVE-2023-2455 and CVE-2016-2193 fixed most interaction between row security and user ID changes. They missed cases where a subquery, WITH query, security invoker view, or SQL-language function references a table with a row-level security policy. This has the same consequences as the two earlier CVEs. That is to say, it leads to potentially incorrect policies being applied in cases where role-specific policies are used and a given query is planned under one role and then executed under other roles. This scenario can happen under security definer functions or when a common user and query is planned initially and then re-used across multiple SET ROLEs. Applying an incorrect policy may permit a user to complete otherwise-forbidden reads and modifications. This affects only databases that have used CREATE POLICY to define a row security policy. An attacker must tailor an attack to a particular application's pattern of query plan reuse, user ID changes, and role-specific row security policies. Versions before PostgreSQL 17.1, 16.5, 15.9, 14.14, 13.17, and 12.21 are affected.

Affected products

VendorProductAffectedFixed
— PostgreSQL 17 – < 17.1, 16 – < 16.5, 15 – < 15.9, 14 – < 14.14, 13 – < 13.17, < 12.21 17.1

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 13 postgresql-17 17.1-1 —
Debian 12 postgresql-15 15.9-0+deb12u1 DSA-5812-1
Debian 11 postgresql-13 13.17-0+deb11u1 DLA-3954-1
ReleasePackageFixed inAdvisory
Ubuntu 24.04 LTS postgresql-16 16.6-0ubuntu0.24.04.1 USN-7132-1
Ubuntu 22.04 LTS postgresql-14 14.15-0ubuntu0.22.04.1 USN-7132-1
Ubuntu 20.04 LTS postgresql-12 12.22-0ubuntu0.20.04.1 USN-7132-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+esm10 USN-7358-1
Ubuntu Pro 14.04 LTS postgresql-9.3 No fix yet —
ReleasePackageFixed inAdvisory
RHEL 9 pg_repack 1.4.8-2.module+el9.5.0+22224+f5585c78 RHSA-2024:10788, RHSA-2024:10787
RHEL 9 pgaudit 1.7.0-1.module+el9.2.0+17405+aeb9ec60 RHSA-2024:10788, RHSA-2024:10787
RHEL 9 pgvector 0.6.2-1.module+el9.5.0+21770+ad2986ef RHSA-2024:10788
RHEL 9 postgres-decoderbufs 1.9.7-1.Final.module+el9.2.0+17405+aeb9ec60 RHSA-2024:10788, RHSA-2024:10787
RHEL 9 postgresql +14 13.18-1.el9_5 RHSA-2024:10791, RHSA-2024:10788, RHSA-2024:10787
RHEL 8 pg_repack 1.4.6-3.module+el8.9.0+19330+c97ddbdf RHSA-2024:10832, RHSA-2024:10831, RHSA-2024:10830
RHEL 8 pgaudit 1.4.0-7.module+el8.10.0+22214+9beb89d6 RHSA-2024:10832, RHSA-2024:10831, RHSA-2024:10830
RHEL 8 postgres-decoderbufs 0.10.0-2.module+el8.9.0+19330+c97ddbdf RHSA-2024:10832, RHSA-2024:10831, RHSA-2024:10830
RHEL 8 postgresql +12 12.22-1.module+el8.10.0+22548+dd326681 RHSA-2024:10832, RHSA-2024:10831, RHSA-2024:10830
RHEL 8 postgresql-private-libs +1 15.10-1.module+el8.10.0+22550+22c7d5ca RHSA-2024:10831, RHSA-2024:10830

AlmaLinux

Errata ↗
ReleasePackageFixed inAdvisory
AlmaLinux 9 pg_repack 1.4.8-2.module_el9.5.0+120+4533eb20 ALSA-2024:10788, ALSA-2024:10787
AlmaLinux 9 pgaudit 1.7.0-1.module_el9.3.0+52+21733919 ALSA-2024:10788, ALSA-2024:10787
AlmaLinux 9 pgvector 0.6.2-1.module_el9.5.0+120+4533eb20 ALSA-2024:10788
AlmaLinux 9 postgres-decoderbufs 1.9.7-1.Final.module_el9.3.0+52+21733919 ALSA-2024:10788, ALSA-2024:10787
AlmaLinux 9 postgresql +14 13.18-1.el9_5 ALSA-2024:10791, ALSA-2024:10788, ALSA-2024:10787
AlmaLinux 8 pg_repack 1.4.6-3.module_el8.6.0+2760+1746ec94 ALSA-2024:10832, ALSA-2024:10831, ALSA-2024:10830
AlmaLinux 8 pgaudit 1.4.0-7.module_el8.9.0+3740+0e74851f.alma.1 ALSA-2024:10832, ALSA-2024:10831, ALSA-2024:10830
AlmaLinux 8 postgres-decoderbufs 0.10.0-2.module_el8.6.0+2760+1746ec94 ALSA-2024:10832, ALSA-2024:10831, ALSA-2024:10830
AlmaLinux 8 postgresql +12 12.22-1.module_el8.10.0+3927+7f0fab70 ALSA-2024:10832, ALSA-2024:10831, ALSA-2024:10830
AlmaLinux 8 postgresql-private-libs +1 15.10-1.module_el8.10.0+3929+38258aa5 ALSA-2024:10831, ALSA-2024:10830

Rocky Linux

Errata ↗
ReleasePackageFixed inAdvisory
Rocky Linux 9 pg_repack 1.4.8-2.module+el9.5.0+30637+4391fcca RLSA-2024:10788, RLSA-2024:10787
Rocky Linux 9 pgaudit 1.7.0-1.module+el9.5.0+30637+4391fcca RLSA-2024:10788, RLSA-2024:10787
Rocky Linux 9 pgvector 0.6.2-1.module+el9.5.0+30638+72f697e1 RLSA-2024:10788
Rocky Linux 9 postgres-decoderbufs 1.9.7-1.Final.module+el9.5.0+30637+4391fcca RLSA-2024:10788, RLSA-2024:10787
Rocky Linux 8 pg_repack 1.4.6-3.module+el8.10.0+1862+29bef648 RLSA-2024:10831, RLSA-2024:10830, RLSA-2024:10785
Rocky Linux 8 pgaudit 1.4.0-7.module+el8.9.0+1735+a332307b RLSA-2024:10831, RLSA-2024:10830, RLSA-2024:10785
Rocky Linux 8 postgres-decoderbufs 0.10.0-2.module+el8.10.0+1862+29bef648 RLSA-2024:10831, RLSA-2024:10830, RLSA-2024:10785
Rocky Linux 8 postgresql 12.22-1.module+el8.10.0+1897+c7883fde RLSA-2024:10831, RLSA-2024:10830, RLSA-2024:10785
ReleasePackageFixed inAdvisory
SLES 15 SP6 postgresql 17-150600.17.6.1 SUSE-SU-2024:4063-1
SLES 15 SP6 postgresql14 14.15-150600.16.9.1 SUSE-SU-2024:4118-1
SLES 15 SP6 postgresql15 15.10-150600.16.9.1 SUSE-SU-2024:4098-1
SLES 15 SP6 postgresql16 16.6-150600.16.10.1 SUSE-SU-2024:4063-1
SLES 15 SP6 postgresql17 17.2-150600.13.5.1 SUSE-SU-2024:4063-1
SLES 15 SP5 postgresql 17-150500.10.9.1 SUSE-SU-2024:4173-1
SLES 15 SP5 postgresql14 14.15-150200.5.50.1 SUSE-SU-2024:4176-1
SLES 15 SP5 postgresql15 15.10-150200.5.33.1 SUSE-SU-2024:4174-1
SLES 15 SP5 postgresql16 16.6-150200.5.21.1 SUSE-SU-2024:4173-1
SLES 15 SP5 postgresql17 17.2-150200.5.5.1 SUSE-SU-2024:4173-1
SLES 15 SP4 postgresql 17-150400.4.18.1 SUSE-SU-2024:4173-1
SLES 15 SP4 postgresql13 13.18-150200.5.64.1 SUSE-SU-2024:4175-1
SLES 15 SP4 postgresql14 14.15-150200.5.50.1 SUSE-SU-2024:4176-1
SLES 15 SP4 postgresql15 15.10-150200.5.33.1 SUSE-SU-2024:4174-1
SLES 15 SP4 postgresql16 16.6-150200.5.21.1 SUSE-SU-2024:4173-1
SLES 15 SP4 postgresql17 17.2-150200.5.5.1 SUSE-SU-2024:4173-1
SLES 15 SP3 postgresql 17-150300.10.27.1 SUSE-SU-2024:4173-1
SLES 15 SP3 postgresql12 12.22-150200.8.66.1 SUSE-SU-2024:4099-1
SLES 15 SP3 postgresql13 13.18-150200.5.64.1 SUSE-SU-2024:4175-1
SLES 15 SP3 postgresql14 14.15-150200.5.50.1 SUSE-SU-2024:4176-1
SLES 15 SP3 postgresql15 15.10-150200.5.33.1 SUSE-SU-2024:4174-1
SLES 15 SP3 postgresql16 16.6-150200.5.21.1 SUSE-SU-2024:4173-1
SLES 15 SP3 postgresql17 17.2-150200.5.5.1 SUSE-SU-2024:4173-1
SLES 15 SP2 postgresql 17-150200.4.30.1 SUSE-SU-2024:4173-1
SLES 15 SP2 postgresql12 12.22-150200.8.66.1 SUSE-SU-2024:4099-1
SLES 15 SP2 postgresql13 13.18-150200.5.64.1 SUSE-SU-2024:4175-1
SLES 15 SP2 postgresql14 14.15-150200.5.50.1 SUSE-SU-2024:4176-1
Show 10 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES 12 SP5 postgresql 17-4.29.1 SUSE-SU-2025:01799-1
SLES 12 SP5 postgresql12 12.22-3.63.1 SUSE-SU-2024:4097-1
SLES 12 SP5 postgresql13 13.18-3.55.2 SUSE-SU-2024:4114-1
SLES 12 SP5 postgresql14 14.15-3.49.1 SUSE-SU-2024:4096-1
SLES 12 SP5 postgresql15 15.10-3.33.1 SUSE-SU-2024:4095-1
SLES 12 SP5 postgresql16 16.6-3.21.1 SUSE-SU-2025:01799-1
SLES 12 SP5 postgresql17 17.2-3.5.1 SUSE-SU-2025:01799-1
SLES for SAP 15 SP4 postgresql 17-150400.4.18.1 SUSE-SU-2024:4173-1
SLES for SAP 15 SP4 postgresql13 13.18-150200.5.64.1 SUSE-SU-2024:4175-1
SLES for SAP 15 SP4 postgresql14 14.15-150200.5.50.1 SUSE-SU-2024:4176-1
SLES for SAP 15 SP4 postgresql15 15.10-150200.5.33.1 SUSE-SU-2024:4174-1
SLES for SAP 15 SP4 postgresql16 16.6-150200.5.21.1 SUSE-SU-2024:4173-1
SLES for SAP 15 SP4 postgresql17 17.2-150200.5.5.1 SUSE-SU-2024:4173-1
SLES for SAP 15 SP3 postgresql 17-150300.10.27.1 SUSE-SU-2024:4173-1
SLES for SAP 15 SP3 postgresql12 12.22-150200.8.66.1 SUSE-SU-2024:4099-1
SLES for SAP 15 SP3 postgresql13 13.18-150200.5.64.1 SUSE-SU-2024:4175-1
SLES for SAP 15 SP3 postgresql14 14.15-150200.5.50.1 SUSE-SU-2024:4176-1
SLES for SAP 15 SP3 postgresql15 15.10-150200.5.33.1 SUSE-SU-2024:4174-1
SLES for SAP 15 SP3 postgresql16 16.6-150200.5.21.1 SUSE-SU-2024:4173-1
SLES for SAP 15 SP3 postgresql17 17.2-150200.5.5.1 SUSE-SU-2024:4173-1
SLES for SAP 15 SP2 postgresql 17-150200.4.30.1 SUSE-SU-2024:4173-1
SLES for SAP 15 SP2 postgresql12 12.22-150200.8.66.1 SUSE-SU-2024:4099-1
SLES for SAP 15 SP2 postgresql13 13.18-150200.5.64.1 SUSE-SU-2024:4175-1
SLES for SAP 15 SP2 postgresql14 14.15-150200.5.50.1 SUSE-SU-2024:4176-1
SLE HPC 15 SP4 postgresql 17-150400.4.18.1 SUSE-SU-2024:4173-1
SLE HPC 15 SP4 postgresql13 13.18-150200.5.64.1 SUSE-SU-2024:4175-1
SLE HPC 15 SP4 postgresql14 14.15-150200.5.50.1 SUSE-SU-2024:4176-1
SLE HPC 15 SP4 postgresql15 15.10-150200.5.33.1 SUSE-SU-2024:4174-1
SLE HPC 15 SP4 postgresql16 16.6-150200.5.21.1 SUSE-SU-2024:4173-1
SLE HPC 15 SP4 postgresql17 17.2-150200.5.5.1 SUSE-SU-2024:4173-1
SLE HPC 15 SP3 postgresql 17-150300.10.27.1 SUSE-SU-2024:4173-1
SLE HPC 15 SP3 postgresql12 12.22-150200.8.66.1 SUSE-SU-2024:4099-1
SLE HPC 15 SP3 postgresql13 13.18-150200.5.64.1 SUSE-SU-2024:4175-1
SLE HPC 15 SP3 postgresql14 14.15-150200.5.50.1 SUSE-SU-2024:4176-1
SLE HPC 15 SP3 postgresql15 15.10-150200.5.33.1 SUSE-SU-2024:4174-1
SLE HPC 15 SP3 postgresql16 16.6-150200.5.21.1 SUSE-SU-2024:4173-1
SLE HPC 15 SP3 postgresql17 17.2-150200.5.5.1 SUSE-SU-2024:4173-1
SLE HPC 15 SP2 postgresql 17-150200.4.30.1 SUSE-SU-2024:4173-1
SLE HPC 15 SP2 postgresql12 12.22-150200.8.66.1 SUSE-SU-2024:4099-1
SLE HPC 15 SP2 postgresql13 13.18-150200.5.64.1 SUSE-SU-2024:4175-1
SLE HPC 15 SP2 postgresql14 14.15-150200.5.50.1 SUSE-SU-2024:4176-1
SUSE Manager Server 4.3 postgresql 17-150400.4.18.1 SUSE-SU-2024:4173-1
SUSE Manager Server 4.3 postgresql14 14.15-150200.5.50.1 SUSE-SU-2024:4176-1
SUSE Manager Server 4.3 postgresql15 15.10-150200.5.33.1 SUSE-SU-2024:4174-1
SUSE Manager Server 4.3 postgresql16 16.6-150200.5.21.1 SUSE-SU-2024:4173-1
SUSE Manager Server 4.3 postgresql17 17.2-150200.5.5.1 SUSE-SU-2024:4173-1
SUSE Manager Proxy 4.3 postgresql 17-150400.4.18.1 SUSE-SU-2024:4173-1
SUSE Manager Proxy 4.3 postgresql14 14.15-150200.5.50.1 SUSE-SU-2024:4176-1
SUSE Manager Proxy 4.3 postgresql15 15.10-150200.5.33.1 SUSE-SU-2024:4174-1
SUSE Manager Proxy 4.3 postgresql16 16.6-150200.5.21.1 SUSE-SU-2024:4173-1
SUSE Manager Proxy 4.3 postgresql17 17.2-150200.5.5.1 SUSE-SU-2024:4173-1
SUSE Enterprise Storage 7.1 postgresql 17-150300.10.27.1 SUSE-SU-2024:4173-1
SUSE Enterprise Storage 7.1 postgresql12 12.22-150200.8.66.1 SUSE-SU-2024:4099-1
SUSE Enterprise Storage 7.1 postgresql13 13.18-150200.5.64.1 SUSE-SU-2024:4175-1
SUSE Enterprise Storage 7.1 postgresql14 14.15-150200.5.50.1 SUSE-SU-2024:4176-1
SUSE Enterprise Storage 7.1 postgresql15 15.10-150200.5.33.1 SUSE-SU-2024:4174-1
SUSE Enterprise Storage 7.1 postgresql16 16.6-150200.5.21.1 SUSE-SU-2024:4173-1
SUSE Enterprise Storage 7.1 postgresql17 17.2-150200.5.5.1 SUSE-SU-2024:4173-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed postgresql12 12.21-1.1 openSUSE-SU-2024:14501-1
openSUSE Tumbleweed postgresql13 13.17-1.1 openSUSE-SU-2024:14502-1
openSUSE Tumbleweed postgresql14 14.14-1.1 openSUSE-SU-2024:14503-1
openSUSE Tumbleweed postgresql15 15.9-1.1 openSUSE-SU-2024:14504-1
openSUSE Tumbleweed postgresql16 16.5-1.1 openSUSE-SU-2024:14505-1
openSUSE Tumbleweed postgresql17 17.1-1.1 openSUSE-SU-2024:14506-1
openSUSE Leap 15.6 postgresql 17-150600.17.6.1 SUSE-SU-2024:4063-1
openSUSE Leap 15.6 postgresql12 12.22-150200.8.66.1 SUSE-SU-2024:4099-1
openSUSE Leap 15.6 postgresql13 13.18-150200.5.64.1 SUSE-SU-2024:4175-1
openSUSE Leap 15.6 postgresql14 14.15-150600.16.9.1 SUSE-SU-2024:4118-1
openSUSE Leap 15.6 postgresql15 15.10-150600.16.9.1 SUSE-SU-2024:4098-1
openSUSE Leap 15.6 postgresql16 16.6-150600.16.10.1 SUSE-SU-2024:4063-1
openSUSE Leap 15.6 postgresql17 17.2-150600.13.5.1 SUSE-SU-2024:4063-1
openSUSE Leap 15.5 postgresql 17-150500.10.9.1 SUSE-SU-2024:4173-1
openSUSE Leap 15.5 postgresql12 12.22-150200.8.66.1 SUSE-SU-2024:4099-1
openSUSE Leap 15.5 postgresql13 13.18-150200.5.64.1 SUSE-SU-2024:4175-1
openSUSE Leap 15.5 postgresql14 14.15-150200.5.50.1 SUSE-SU-2024:4176-1
openSUSE Leap 15.5 postgresql15 15.10-150200.5.33.1 SUSE-SU-2024:4174-1
openSUSE Leap 15.5 postgresql16 16.6-150200.5.21.1 SUSE-SU-2024:4173-1
openSUSE Leap 15.5 postgresql17 17.2-150200.5.5.1 SUSE-SU-2024:4173-1
ReleasePackageFixed inAdvisory
Alpine v3.24 postgresql16 16.5-r0 —
Alpine v3.24 postgresql17 17.1-r0 —
Alpine v3.23 postgresql16 16.5-r0 —
Alpine v3.23 postgresql17 17.1-r0 —
Alpine v3.22 postgresql15 15.9-r0 —
Alpine v3.22 postgresql16 16.5-r0 —
Alpine v3.22 postgresql17 17.1-r0 —
Alpine v3.21 postgresql15 15.9-r0 —
Alpine v3.21 postgresql16 16.5-r0 —
Alpine v3.21 postgresql17 17.1-r0 —
Alpine v3.20 postgresql14 14.14-r0 —
Alpine v3.20 postgresql15 15.9-r0 —
Alpine v3.20 postgresql16 16.5-r0 —
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Alpine v3.19 postgresql13 13.17-r0 —
Alpine v3.19 postgresql14 14.14-r0 —
Alpine v3.19 postgresql15 15.9-r0 —
Alpine v3.19 postgresql16 16.5-r0 —
Alpine v3.18 postgresql13 13.17-r0 —
Alpine v3.18 postgresql14 14.14-r0 —
Alpine v3.18 postgresql15 15.9-r0 —
Alpine v3.17 postgresql13 13.17-r0 —
Alpine v3.17 postgresql14 14.14-r0 —
Alpine v3.17 postgresql15 15.9-r0 —

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 postgresql15 +15 15.9-1.amzn2023.0.1 ALAS2023-2024-787
Amazon Linux 2023 postgresql16 +15 16.5-1.amzn2023.0.1 ALAS2023-2024-786

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 postgresql 16.5-1 —
Azure Linux 2 (CBL-Mariner) postgresql 14.14-1 —

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 9 pg_repack 1.4.8-2.module+el9.5.0+90424+300303e9 ELSA-2024-10788, ELSA-2024-10787
Oracle Linux 9 pgaudit 1.7.0-1.module+el9.2.0+21134+ceb95ed9 ELSA-2024-10788, ELSA-2024-10787
Oracle Linux 9 pgvector 0.6.2-1.module+el9.5.0+90425+0820a3c3 ELSA-2024-10788
Oracle Linux 9 postgres-decoderbufs 1.9.7-1.Final.module+el9.2.0+21134+ceb95ed9 ELSA-2024-10788, ELSA-2024-10787
Oracle Linux 9 postgresql +14 13.18-1.el9_5 ELSA-2024-10791, ELSA-2024-10788, ELSA-2024-10787
Oracle Linux 8 pg_repack 1.4.6-3.module+el8.9.0+90098+1560b6c2 ELSA-2024-10832, ELSA-2024-10831, ELSA-2024-10830
Oracle Linux 8 pgaudit 1.4.0-7.module+el8.10.0+90397+67dad74f ELSA-2024-10832, ELSA-2024-10831, ELSA-2024-10830
Oracle Linux 8 postgres-decoderbufs 0.10.0-2.module+el8.9.0+90098+1560b6c2 ELSA-2024-10832, ELSA-2024-10831, ELSA-2024-10830
Oracle Linux 8 postgresql +12 12.22-1.module+el8.10.0+90457+0de00356 ELSA-2024-10832, ELSA-2024-10831, ELSA-2024-10830
Oracle Linux 8 postgresql-private-libs +1 15.10-1.module+el8.10.0+90458+cb6e8adf ELSA-2024-10831, ELSA-2024-10830

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling postgresql-12 12.21-r0 —
Wolfi rolling postgresql-13 13.17-r0 —
Wolfi rolling postgresql-14 14.14-r0 —
Wolfi rolling postgresql-14-client 14.24-r2 —
Wolfi rolling postgresql-15 15.9-r0 —
Wolfi rolling postgresql-15-client 15.19-r2 —
Wolfi rolling postgresql-16 16.5-r0 —
Wolfi rolling postgresql-17 17.1-r0 —

Advisories 50

References