CVE-2025-8713PostgreSQL optimizer statistics can expose sampled data within a view, partition, or…
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.
What to do
Fixed builds are available from AlmaLinux, Alpine, Debian, Red Hat, Ubuntu: see the table below for the fixed version per release.
Red Hat, Ubuntu have not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 25.10 | postgresql-17 | Fixed | 17.6-1 | UBUNTU-CVE-2025-8713 |
| Ubuntu 24.04 | postgresql-16 | Fixed | 16.10-0ubuntu0.24.04.1 | UBUNTU-CVE-2025-8713 |
| Ubuntu 22.04 | postgresql-14 | Fixed | 14.19-0ubuntu0.22.04.1 | UBUNTU-CVE-2025-8713 |
| Ubuntu 20.04 | postgresql-12 | Fix pending | UBUNTU-CVE-2025-8713 | |
| Ubuntu 18.04 | postgresql-10 | Fix pending | UBUNTU-CVE-2025-8713 | |
| Ubuntu 16.04 | postgresql-9.5 | Fix pending | UBUNTU-CVE-2025-8713 | |
| Ubuntu 14.04 | postgresql-9.3 | Fix pending | UBUNTU-CVE-2025-8713 | |
| Debian 13 | postgresql-17 | Fixed | 17.6-0+deb13u1 | DEBIAN-CVE-2025-8713 |
| Debian 12 | postgresql-15 | Fixed | 15.14-0+deb12u1 | DEBIAN-CVE-2025-8713 |
| Red Hat Enterprise Linux 10 | postgresql | Fix pending Affected | ||
| Red Hat Enterprise Linux 10 | postgresql-contrib | Fix pending Affected | ||
| Red Hat Enterprise Linux 10 | postgresql-docs | Fix pending Affected | ||
| Red Hat Enterprise Linux 10 | postgresql-plperl | Fix pending Affected | ||
| Red Hat Enterprise Linux 10 | postgresql-plpython3 | Fix pending Affected | ||
| Red Hat Enterprise Linux 10 | postgresql-pltcl | Fix pending Affected | ||
| Red Hat Enterprise Linux 10 | postgresql-private-devel | Fix pending Affected | ||
| Red Hat Enterprise Linux 10 | postgresql-private-libs | Fix pending Affected | ||
| Red Hat Enterprise Linux 10 | postgresql-server | Fix pending Affected | ||
| Red Hat Enterprise Linux 10 | postgresql-server-devel | Fix pending Affected | ||
| Red Hat Enterprise Linux 10 | postgresql-static | Fix pending Affected | ||
| Red Hat Enterprise Linux 10 | postgresql-test | Fix pending Affected | ||
| Red Hat Enterprise Linux 10 | postgresql-test-rpm-macros | Fix pending Affected | ||
| Red Hat Enterprise Linux 10 | postgresql-upgrade | Fix pending Affected | ||
| Red Hat Enterprise Linux 10 | postgresql-upgrade-devel | Fix pending Affected | ||
| Red Hat Enterprise Linux 10 | postgresql16 | Fix pending Affected | ||
| Red Hat Enterprise Linux 9 | pg_repack | Fixed | 0:1.4.8-2.module+el9.5.0+22224+f5585c78 | RHSA-2025:14827 |
| Red Hat Enterprise Linux 9 | pgaudit | Fixed | 0:16.0-1.module+el9.4.0+20427+07482b8c | RHSA-2025:14862 |
| Red Hat Enterprise Linux 9 | pgvector | Fixed | 0:0.6.2-2.module+el9.6.0+22979+c3d78d52 | RHSA-2025:14827 |
| Red Hat Enterprise Linux 9 | postgres-decoderbufs | Fixed | 0:2.4.0-1.Final.module+el9.4.0+20427+07482b8c | RHSA-2025:14862 |
| Red Hat Enterprise Linux 9 | postgresql | Fixed | 0:16.10-1.module+el9.6.0+23420+848a4539 | RHSA-2025:14878 |
| Red Hat Enterprise Linux 9 | postgresql-contrib | Fixed | 0:15.14-1.module+el9.6.0+23419+7863ab62 | RHSA-2025:14878 |
| Red Hat Enterprise Linux 9 | postgresql-docs | Fixed | 0:15.14-1.module+el9.6.0+23419+7863ab62 | RHSA-2025:14878 |
| Red Hat Enterprise Linux 9 | postgresql-plperl | Fixed | 0:13.22-1.el9_6 | RHSA-2025:14827 |
| Red Hat Enterprise Linux 9 | postgresql-plpython3 | Fixed | 0:13.22-1.el9_6 | RHSA-2025:14827 |
| Red Hat Enterprise Linux 9 | postgresql-pltcl | Fixed | 0:13.22-1.el9_6 | RHSA-2025:14827 |
| Red Hat Enterprise Linux 9 | postgresql-private-devel | Fixed | 0:15.14-1.module+el9.6.0+23419+7863ab62 | RHSA-2025:14878 |
| Red Hat Enterprise Linux 9 | postgresql-private-libs | Fixed | 0:13.22-1.el9_6 | RHSA-2025:14862 |
| Red Hat Enterprise Linux 9 | postgresql-server | Fixed | 0:13.22-1.el9_6 | RHSA-2025:14862 |
| Red Hat Enterprise Linux 9 | postgresql-server-devel | Fixed | 0:13.22-1.el9_6 | RHSA-2025:14827 |
| Red Hat Enterprise Linux 9 | postgresql-static | Fixed | 0:15.14-1.module+el9.6.0+23419+7863ab62 | RHSA-2025:14827 |
| Red Hat Enterprise Linux 9 | postgresql-test | Fixed | 0:16.10-1.module+el9.6.0+23420+848a4539 | RHSA-2025:14862 |
| Red Hat Enterprise Linux 9 | postgresql-test-rpm-macros | Fixed | 0:13.22-1.el9_6 | RHSA-2025:14862 |
| Red Hat Enterprise Linux 9 | postgresql-upgrade | Fixed | 0:13.22-1.el9_6 | RHSA-2025:14827 |
| Red Hat Enterprise Linux 9 | postgresql-upgrade-devel | Fixed | 0:15.14-1.module+el9.6.0+23419+7863ab62 | RHSA-2025:14827 |
| Red Hat Enterprise Linux 8 | pg_repack | Fix pending Affected | ||
| Red Hat Enterprise Linux 8 | pgaudit | Fix pending Affected | ||
| Red Hat Enterprise Linux 8 | postgres-decoderbufs | Fix pending Affected | ||
| Red Hat Enterprise Linux 8 | postgresql | Fix pending Affected | ||
| Red Hat Enterprise Linux 8 | postgresql-contrib | Fix pending Affected | ||
| Red Hat Enterprise Linux 8 | postgresql-docs | Fix pending Affected | ||
| Red Hat Enterprise Linux 8 | postgresql-plperl | Fix pending Affected | ||
| Red Hat Enterprise Linux 8 | postgresql-plpython3 | Fix pending Affected | ||
| Red Hat Enterprise Linux 8 | postgresql-pltcl | Fix pending Affected | ||
| Red Hat Enterprise Linux 8 | postgresql-private-devel | Fix pending Affected | ||
| Red Hat Enterprise Linux 8 | postgresql-private-libs | Fix pending Affected | ||
| Red Hat Enterprise Linux 8 | postgresql-server | Fix pending Affected | ||
| Red Hat Enterprise Linux 8 | postgresql-server-devel | Fix pending Affected | ||
| Red Hat Enterprise Linux 8 | postgresql-static | Fix pending Affected | ||
| Red Hat Enterprise Linux 8 | postgresql-test | Fix pending Affected | ||
| Red Hat Enterprise Linux 8 | postgresql-test-rpm-macros | Fix pending Affected | ||
| Red Hat Enterprise Linux 8 | postgresql-upgrade | Fix pending Affected | ||
| Red Hat Enterprise Linux 8 | postgresql-upgrade-devel | Fix pending Affected | ||
| Red Hat Enterprise Linux 7 | postgresql | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 7 | postgresql-contrib | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 7 | postgresql-devel | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 7 | postgresql-docs | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 7 | postgresql-libs | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 7 | postgresql-plperl | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 7 | postgresql-plpython | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 7 | postgresql-pltcl | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 7 | postgresql-server | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 7 | postgresql-static | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 7 | postgresql-test | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 7 | postgresql-upgrade | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 6 | postgresql | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-contrib | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-devel | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-docs | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-libs | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-plperl | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-plpython | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-pltcl | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-server | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-test | Will not fix Out of support scope | ||
| AlmaLinux 9 | pg_repack | Fixed | 1.4.8-2.module_el9.5.0+119+18833d03 | ALSA-2025:14827 |
| AlmaLinux 9 | pgaudit | Fixed | 1.7.0-1.module_el9.3.0+52+21733919 | ALSA-2025:14827 |
| AlmaLinux 9 | pgvector | Fixed | 0.6.2-2.module_el9.6.0+167+4e561146 | ALSA-2025:14827 |
| AlmaLinux 9 | postgres-decoderbufs | Fixed | 2.4.0-1.Final.module_el9.4.0+66+eb9878bc | ALSA-2025:14862 |
| AlmaLinux 9 | postgresql | Fixed | 16.10-1.module_el9.6.0+174+80cb77f0 | ALSA-2025:14862 |
| AlmaLinux 9 | postgresql-contrib | Fixed | 16.10-1.module_el9.6.0+174+80cb77f0 | ALSA-2025:14862 |
| AlmaLinux 9 | postgresql-docs | Fixed | 16.10-1.module_el9.6.0+174+80cb77f0 | ALSA-2025:14862 |
| AlmaLinux 9 | postgresql-plperl | Fixed | 15.14-1.module_el9.6.0+176+c508cfa2 | ALSA-2025:14827 |
| AlmaLinux 9 | postgresql-plpython3 | Fixed | 16.10-1.module_el9.6.0+174+80cb77f0 | ALSA-2025:14862 |
| AlmaLinux 9 | postgresql-pltcl | Fixed | 16.10-1.module_el9.6.0+174+80cb77f0 | ALSA-2025:14862 |
| AlmaLinux 9 | postgresql-private-devel | Fixed | 16.10-1.module_el9.6.0+174+80cb77f0 | ALSA-2025:14862 |
| AlmaLinux 9 | postgresql-private-libs | Fixed | 16.10-1.module_el9.6.0+174+80cb77f0 | ALSA-2025:14862 |
| AlmaLinux 9 | postgresql-server | Fixed | 15.14-1.module_el9.6.0+176+c508cfa2 | ALSA-2025:14827 |
| AlmaLinux 9 | postgresql-server-devel | Fixed | 15.14-1.module_el9.6.0+176+c508cfa2 | ALSA-2025:14827 |
| AlmaLinux 9 | postgresql-static | Fixed | 16.10-1.module_el9.6.0+174+80cb77f0 | ALSA-2025:14862 |
| AlmaLinux 9 | postgresql-test | Fixed | 15.14-1.module_el9.6.0+176+c508cfa2 | ALSA-2025:14827 |
| AlmaLinux 9 | postgresql-test-rpm-macros | Fixed | 15.14-1.module_el9.6.0+176+c508cfa2 | ALSA-2025:14827 |
| AlmaLinux 9 | postgresql-upgrade | Fixed | 15.14-1.module_el9.6.0+176+c508cfa2 | ALSA-2025:14827 |
| AlmaLinux 9 | postgresql-upgrade-devel | Fixed | 16.10-1.module_el9.6.0+174+80cb77f0 | ALSA-2025:14862 |
| Alpine Linux 3.24 | postgresql16 | Fixed | 16.10-r0 | ALPINE-CVE-2025-8713 |
| Alpine Linux 3.24 | postgresql17 | Fixed | 17.6-r0 | ALPINE-CVE-2025-8713 |
| Alpine Linux 3.23 | postgresql16 | Fixed | 16.10-r0 | ALPINE-CVE-2025-8713 |
| Alpine Linux 3.23 | postgresql17 | Fixed | 17.6-r0 | ALPINE-CVE-2025-8713 |
| Alpine Linux 3.22 | postgresql15 | Fixed | 15.14-r0 | ALPINE-CVE-2025-8713 |
| Alpine Linux 3.22 | postgresql16 | Fixed | 16.10-r0 | ALPINE-CVE-2025-8713 |
| Alpine Linux 3.22 | postgresql17 | Fixed | 17.6-r0 | ALPINE-CVE-2025-8713 |
| Alpine Linux 3.21 | postgresql15 | Fixed | 15.17-r0 | ALPINE-CVE-2025-8713 |
| Alpine Linux 3.21 | postgresql16 | Fixed | 16.10-r0 | ALPINE-CVE-2025-8713 |
| Alpine Linux 3.21 | postgresql17 | Fixed | 17.6-r0 | ALPINE-CVE-2025-8713 |
| Alpine Linux 3.20 | postgresql15 | Fixed | 15.14-r0 | ALPINE-CVE-2025-8713 |
| Alpine Linux 3.20 | postgresql16 | Fixed | 16.10-r0 | ALPINE-CVE-2025-8713 |
| Alpine Linux 3.19 | postgresql15 | Fixed | 15.14-r0 | ALPINE-CVE-2025-8713 |
| Alpine Linux 3.19 | postgresql16 | Fixed | 16.10-r0 | ALPINE-CVE-2025-8713 |
What the vendor says
As published in the CVE record by PostgreSQL, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- PostgreSQL: affected: 17 to before 17.6, 16 to before 16.10, 15 to before 15.14, 14 to before 14.19, before 13.22; fixed in
17.6,16.10,15.14,14.19,13.22
References
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.