Skip to content
OpenAdvisories
Low · 3.1 CVE-2025-8713 EUVD-2025-24811GHSA-cqj3-wjpm-fjvp

PostgreSQL optimizer statistics can expose sampled data within a view, partition, or child table

Published Aug 14, 2025 · Updated Aug 14, 2025 · Assigned by PostgreSQL

Description

PostgreSQL optimizer statistics allow a user to read sampled data within a view that the user cannot access. Separately, statistics allow a user to read sampled data that a row security policy intended to hide. PostgreSQL maintains statistics for tables by sampling data available in columns; this data is consulted during the query planning process. Prior to this release, a user could craft a leaky operator that bypassed view access control lists (ACLs) and bypassed row security policies in partitioning or table inheritance hierarchies. Reachable statistics data notably included histograms and most-common-values lists. CVE-2017-7484 and CVE-2019-10130 intended to close this class of vulnerability, but this gap remained. Versions before PostgreSQL 17.6, 16.10, 15.14, 14.19, and 13.22 are affected.

Affected products

VendorProductAffectedFixed
— PostgreSQL 17 – < 17.6, 16 – < 16.10, 15 – < 15.14, 14 – < 14.19, < 13.22 17.6

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.6-0+deb13u1 —
Debian 12 postgresql-15 15.14-0+deb12u1 —
Debian 11 postgresql-13 13.22-0+deb11u1 DLA-4273-1
ReleasePackageFixed inAdvisory
Ubuntu 25.10 postgresql-17 17.6-1 —
Ubuntu 24.04 LTS postgresql-16 16.10-0ubuntu0.24.04.1 USN-7741-1
Ubuntu 22.04 LTS postgresql-14 14.19-0ubuntu0.22.04.1 USN-7741-1
Ubuntu 20.04 LTS postgresql-12 No fix yet —
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 No fix yet —
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-2025:14862, RHSA-2025:14827
RHEL 9 pgaudit 1.7.0-1.module+el9.2.0+17405+aeb9ec60 RHSA-2025:14862, RHSA-2025:14827
RHEL 9 pgvector 0.6.2-2.module+el9.6.0+22979+c3d78d52 RHSA-2025:14827
RHEL 9 postgres-decoderbufs 1.9.7-1.Final.module+el9.2.0+17405+aeb9ec60 RHSA-2025:14862, RHSA-2025:14827
RHEL 9 postgresql +14 13.22-1.el9_6 RHSA-2025:14878, RHSA-2025:14862, RHSA-2025:14827
Show 9 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
RHEL 9.4 EUS pg_repack 1.4.8-1.module+el9.2.0+17405+aeb9ec60 RHSA-2025:15015, RHSA-2025:15014
RHEL 9.4 EUS pgaudit 1.7.0-1.module+el9.2.0+17405+aeb9ec60 RHSA-2025:15015, RHSA-2025:15014
RHEL 9.4 EUS postgres-decoderbufs 1.9.7-1.Final.module+el9.2.0+17405+aeb9ec60 RHSA-2025:15015, RHSA-2025:15014
RHEL 9.4 EUS postgresql +13 13.22-1.el9_4 RHSA-2025:15114, RHSA-2025:15015, RHSA-2025:15014
RHEL 9.4 EUS postgresql-test-rpm-macros 15.14-1.module+el9.4.0+23426+8bcd22f5 RHSA-2025:15015, RHSA-2025:15014
RHEL 9.2 E4S pg_repack 1.4.8-1.module+el9.2.0+17405+aeb9ec60 RHSA-2025:15062
RHEL 9.2 E4S pgaudit 1.7.0-1.module+el9.2.0+17405+aeb9ec60 RHSA-2025:15062
RHEL 9.2 E4S postgres-decoderbufs 1.9.7-1.Final.module+el9.2.0+17405+aeb9ec60 RHSA-2025:15062
RHEL 9.2 E4S postgresql +7 13.22-1.el9_2 RHSA-2025:15062, RHSA-2025:14869
RHEL 9.2 E4S postgresql-docs +6 15.14-1.module+el9.2.0+23414+35f93534 RHSA-2025:15062
RHEL 9.0 E4S postgresql +7 13.22-1.el9_0 RHSA-2025:14870
RHEL 8.8 TUS pg_repack 1.4.6-3.module+el8.5.0+11357+bcc62552 RHSA-2025:15031, RHSA-2025:15013
RHEL 8.8 TUS pgaudit 1.5.0-1.module+el8.4.0+8873+b821c30a RHSA-2025:15031, RHSA-2025:15013
RHEL 8.8 TUS postgres-decoderbufs 0.10.0-2.module+el8.4.0+8873+b821c30a RHSA-2025:15031, RHSA-2025:15013
RHEL 8.8 TUS postgresql +12 13.22-1.module+el8.8.0+23435+45a38323 RHSA-2025:15031, RHSA-2025:15013
RHEL 8.8 TUS postgresql-private-libs +1 15.14-1.module+el8.8.0+23415+58912bc3 RHSA-2025:15031
RHEL 8.8 E4S pg_repack 1.4.6-3.module+el8.5.0+11357+bcc62552 RHSA-2025:15031, RHSA-2025:15013
RHEL 8.8 E4S pgaudit 1.5.0-1.module+el8.4.0+8873+b821c30a RHSA-2025:15031, RHSA-2025:15013
RHEL 8.8 E4S postgres-decoderbufs 0.10.0-2.module+el8.4.0+8873+b821c30a RHSA-2025:15031, RHSA-2025:15013
RHEL 8.8 E4S postgresql +12 13.22-1.module+el8.8.0+23435+45a38323 RHSA-2025:15031, RHSA-2025:15013
RHEL 8.8 E4S postgresql-private-libs +1 15.14-1.module+el8.8.0+23415+58912bc3 RHSA-2025:15031
RHEL 8.6 TUS pg_repack 1.4.6-3.module+el8.5.0+11357+bcc62552 RHSA-2025:15359
RHEL 8.6 TUS pgaudit 1.5.0-1.module+el8.4.0+8873+b821c30a RHSA-2025:15359
RHEL 8.6 TUS postgres-decoderbufs 0.10.0-2.module+el8.4.0+8873+b821c30a RHSA-2025:15359
RHEL 8.6 TUS postgresql +12 13.22-1.module+el8.6.0+23444+2be3520b.1 RHSA-2025:15359
RHEL 8.6 E4S pg_repack 1.4.6-3.module+el8.5.0+11357+bcc62552 RHSA-2025:15359
RHEL 8.6 E4S pgaudit 1.5.0-1.module+el8.4.0+8873+b821c30a RHSA-2025:15359
RHEL 8.6 E4S postgres-decoderbufs 0.10.0-2.module+el8.4.0+8873+b821c30a RHSA-2025:15359
RHEL 8.6 E4S postgresql +12 13.22-1.module+el8.6.0+23444+2be3520b.1 RHSA-2025:15359
RHEL 8.6 AUS pg_repack 1.4.6-3.module+el8.5.0+11357+bcc62552 RHSA-2025:15359
RHEL 8.6 AUS pgaudit 1.5.0-1.module+el8.4.0+8873+b821c30a RHSA-2025:15359
RHEL 8.6 AUS postgres-decoderbufs 0.10.0-2.module+el8.4.0+8873+b821c30a RHSA-2025:15359
RHEL 8.6 AUS postgresql +12 13.22-1.module+el8.6.0+23444+2be3520b.1 RHSA-2025:15359
RHEL 8.4 AUS pgaudit 1.5.0-1.module+el8.4.0+8873+b821c30a RHSA-2025:15057
RHEL 8.4 AUS postgres-decoderbufs 0.10.0-2.module+el8.4.0+8873+b821c30a RHSA-2025:15057
RHEL 8.4 AUS postgresql +12 13.22-1.module+el8.4.0+23428+e8cf4671 RHSA-2025:15057

AlmaLinux

Errata ↗
ReleasePackageFixed inAdvisory
AlmaLinux 9 pg_repack 1.4.8-2.module_el9.5.0+119+18833d03 ALSA-2025:14862, ALSA-2025:14827
AlmaLinux 9 pgaudit 1.7.0-1.module_el9.3.0+52+21733919 ALSA-2025:14862, ALSA-2025:14827
AlmaLinux 9 pgvector 0.6.2-2.module_el9.6.0+167+4e561146 ALSA-2025:14827
AlmaLinux 9 postgres-decoderbufs 1.9.7-1.Final.module_el9.3.0+52+21733919 ALSA-2025:14862, ALSA-2025:14827
AlmaLinux 9 postgresql +14 15.14-1.module_el9.6.0+176+c508cfa2 ALSA-2025:14862, ALSA-2025:14827
ReleasePackageFixed inAdvisory
SLES 15 SP7 postgresql14 14.19-150600.16.20.1 SUSE-SU-2025:03019-2, SUSE-SU-2025:03019-1
SLES 15 SP7 postgresql15 15.14-150600.16.20.1 SUSE-SU-2025:03018-2, SUSE-SU-2025:03018-1
SLES 15 SP7 postgresql16 16.10-150600.16.21.1 SUSE-SU-2025:03005-2, SUSE-SU-2025:03005-1
SLES 15 SP7 postgresql17 17.6-150600.13.16.1 SUSE-SU-2025:02986-1
SLES 15 SP6 postgresql14 14.19-150600.16.20.1 SUSE-SU-2025:03019-1
SLES 15 SP6 postgresql15 15.14-150600.16.20.1 SUSE-SU-2025:03018-1
SLES 15 SP6 postgresql16 16.10-150600.16.21.1 SUSE-SU-2025:03005-2, SUSE-SU-2025:03005-1
SLES 15 SP6 postgresql17 17.6-150600.13.16.1 SUSE-SU-2025:02986-1
SLES 15 SP5 postgresql14 14.19-150200.5.61.1 SUSE-SU-2025:03031-1
SLES 15 SP5 postgresql15 15.14-150200.5.44.1 SUSE-SU-2025:03030-1
SLES 15 SP5 postgresql16 16.10-150200.5.32.1 SUSE-SU-2025:02981-1
SLES 15 SP5 postgresql17 17.6-150200.5.16.1 SUSE-SU-2025:02995-1
SLES 15 SP4 postgresql13 13.22-150200.5.75.2 SUSE-SU-2025:02994-1
SLES 15 SP4 postgresql14 14.19-150200.5.61.1 SUSE-SU-2025:03031-1
SLES 15 SP4 postgresql15 15.14-150200.5.44.1 SUSE-SU-2025:03030-1
SLES 15 SP4 postgresql16 16.10-150200.5.32.1 SUSE-SU-2025:02981-1
SLES 15 SP4 postgresql17 17.6-150200.5.16.1 SUSE-SU-2025:02995-1
SLES 15 SP3 postgresql13 13.22-150200.5.75.2 SUSE-SU-2025:02994-1
SLES 15 SP3 postgresql14 14.19-150200.5.61.1 SUSE-SU-2025:03031-1
SLES 15 SP3 postgresql15 15.14-150200.5.44.1 SUSE-SU-2025:03030-1
SLES 15 SP3 postgresql16 16.10-150200.5.32.1 SUSE-SU-2025:02981-1
SLES 15 SP3 postgresql17 17.6-150200.5.16.1 SUSE-SU-2025:02995-1
Show 10 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES 12 SP5 postgresql13 13.22-3.66.1 SUSE-SU-2025:03003-1
SLES 12 SP5 postgresql14 14.19-3.60.1 SUSE-SU-2025:03020-1
SLES 12 SP5 postgresql15 15.14-3.44.1 SUSE-SU-2025:03004-1
SLES 12 SP5 postgresql16 16.10-3.32.1 SUSE-SU-2025:02980-1
SLES 12 SP5 postgresql17 17.6-3.16.1 SUSE-SU-2025:02987-1
SLES for SAP 15 SP5 postgresql14 14.19-150200.5.61.1 SUSE-SU-2025:03031-1
SLES for SAP 15 SP5 postgresql15 15.14-150200.5.44.1 SUSE-SU-2025:03030-1
SLES for SAP 15 SP5 postgresql16 16.10-150200.5.32.1 SUSE-SU-2025:02981-1
SLES for SAP 15 SP5 postgresql17 17.6-150200.5.16.1 SUSE-SU-2025:02995-1
SLES for SAP 15 SP4 postgresql13 13.22-150200.5.75.2 SUSE-SU-2025:02994-1
SLES for SAP 15 SP4 postgresql14 14.19-150200.5.61.1 SUSE-SU-2025:03031-1
SLES for SAP 15 SP4 postgresql15 15.14-150200.5.44.1 SUSE-SU-2025:03030-1
SLES for SAP 15 SP4 postgresql16 16.10-150200.5.32.1 SUSE-SU-2025:02981-1
SLES for SAP 15 SP4 postgresql17 17.6-150200.5.16.1 SUSE-SU-2025:02995-1
SLES for SAP 15 SP3 postgresql13 13.22-150200.5.75.2 SUSE-SU-2025:02994-1
SLES for SAP 15 SP3 postgresql14 14.19-150200.5.61.1 SUSE-SU-2025:03031-1
SLES for SAP 15 SP3 postgresql15 15.14-150200.5.44.1 SUSE-SU-2025:03030-1
SLES for SAP 15 SP3 postgresql16 16.10-150200.5.32.1 SUSE-SU-2025:02981-1
SLES for SAP 15 SP3 postgresql17 17.6-150200.5.16.1 SUSE-SU-2025:02995-1
SLE HPC 15 SP5 postgresql15 15.14-150200.5.44.1 SUSE-SU-2025:03030-1
SLE HPC 15 SP5 postgresql16 16.10-150200.5.32.1 SUSE-SU-2025:02981-1
SLE HPC 15 SP5 postgresql17 17.6-150200.5.16.1 SUSE-SU-2025:02995-1
SLE HPC 15 SP4 postgresql13 13.22-150200.5.75.2 SUSE-SU-2025:02994-1
SLE HPC 15 SP4 postgresql14 14.19-150200.5.61.1 SUSE-SU-2025:03031-1
SLE HPC 15 SP4 postgresql15 15.14-150200.5.44.1 SUSE-SU-2025:03030-1
SLE HPC 15 SP4 postgresql16 16.10-150200.5.32.1 SUSE-SU-2025:02981-1
SLE HPC 15 SP4 postgresql17 17.6-150200.5.16.1 SUSE-SU-2025:02995-1
SLE HPC 15 SP3 postgresql13 13.22-150200.5.75.2 SUSE-SU-2025:02994-1
SLE HPC 15 SP3 postgresql14 14.19-150200.5.61.1 SUSE-SU-2025:03031-1
SLE HPC 15 SP3 postgresql15 15.14-150200.5.44.1 SUSE-SU-2025:03030-1
SLE HPC 15 SP3 postgresql16 16.10-150200.5.32.1 SUSE-SU-2025:02981-1
SLE HPC 15 SP3 postgresql17 17.6-150200.5.16.1 SUSE-SU-2025:02995-1
SUSE Manager Server LTS 4.3 postgresql14 14.19-150200.5.61.1 SUSE-SU-2025:03031-1
SUSE Manager Server LTS 4.3 postgresql15 15.14-150200.5.44.1 SUSE-SU-2025:03030-1
SUSE Manager Server LTS 4.3 postgresql16 16.10-150200.5.32.1 SUSE-SU-2025:02981-1
SUSE Manager Server LTS 4.3 postgresql17 17.6-150200.5.16.1 SUSE-SU-2025:02995-1
SUSE Manager Proxy LTS 4.3 postgresql14 14.19-150200.5.61.1 SUSE-SU-2025:03031-1
SUSE Manager Proxy LTS 4.3 postgresql15 15.14-150200.5.44.1 SUSE-SU-2025:03030-1
SUSE Manager Proxy LTS 4.3 postgresql16 16.10-150200.5.32.1 SUSE-SU-2025:02981-1
SUSE Manager Proxy LTS 4.3 postgresql17 17.6-150200.5.16.1 SUSE-SU-2025:02995-1
SUSE Enterprise Storage 7.1 postgresql13 13.22-150200.5.75.2 SUSE-SU-2025:02994-1
SUSE Enterprise Storage 7.1 postgresql14 14.19-150200.5.61.1 SUSE-SU-2025:03031-1
SUSE Enterprise Storage 7.1 postgresql15 15.14-150200.5.44.1 SUSE-SU-2025:03030-1
SUSE Enterprise Storage 7.1 postgresql16 16.10-150200.5.32.1 SUSE-SU-2025:02981-1
SUSE Enterprise Storage 7.1 postgresql17 17.6-150200.5.16.1 SUSE-SU-2025:02995-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed postgresql13 13.22-1.1 openSUSE-SU-2025:15450-1
openSUSE Tumbleweed postgresql14 14.19-1.1 openSUSE-SU-2025:15451-1
openSUSE Tumbleweed postgresql15 15.14-1.1 openSUSE-SU-2025:15452-1
openSUSE Tumbleweed postgresql16 16.10-1.1 openSUSE-SU-2025:15453-1
openSUSE Tumbleweed postgresql17 17.6-1.1 openSUSE-SU-2025:15455-1
openSUSE Leap 15.6 postgresql13 13.22-150600.14.11.1 SUSE-SU-2025:02842-1
openSUSE Leap 15.6 postgresql14 14.19-150600.16.20.1 SUSE-SU-2025:03019-1
openSUSE Leap 15.6 postgresql15 15.14-150600.16.20.1 SUSE-SU-2025:03018-1
openSUSE Leap 15.6 postgresql16 16.10-150600.16.21.1 SUSE-SU-2025:03005-2, SUSE-SU-2025:03005-1
openSUSE Leap 15.6 postgresql17 17.6-150600.13.16.1 SUSE-SU-2025:02986-1
ReleasePackageFixed inAdvisory
Alpine v3.24 postgresql16 16.10-r0 —
Alpine v3.24 postgresql17 17.6-r0 —
Alpine v3.23 postgresql16 16.10-r0 —
Alpine v3.23 postgresql17 17.6-r0 —
Alpine v3.22 postgresql15 15.14-r0 —
Alpine v3.22 postgresql16 16.10-r0 —
Alpine v3.22 postgresql17 17.6-r0 —
Alpine v3.21 postgresql15 15.17-r0 —
Alpine v3.21 postgresql16 16.10-r0 —
Alpine v3.21 postgresql17 17.6-r0 —
Alpine v3.20 postgresql15 15.14-r0 —
Alpine v3.20 postgresql16 16.10-r0 —
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Alpine v3.19 postgresql15 15.14-r0 —
Alpine v3.19 postgresql16 16.10-r0 —

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 postgresql15 +15 15.14-1.amzn2023.0.1 ALAS2023-2025-1165
Amazon Linux 2023 postgresql16 +15 16.10-1.amzn2023.0.1 ALAS2023-2025-1177
Amazon Linux 2023 postgresql17 +15 17.6-1.amzn2023.0.1 ALAS2023-2025-1158

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 postgresql 16.10-1 —
Azure Linux 2 (CBL-Mariner) postgresql 14.19-1 —

Advisories 46

References