CVEfocus › CVE database › CVE-2025-8713

CVE-2025-8713PostgreSQL optimizer statistics can expose sampled data within a view, partition, or…

CVSS 3.1 LowEPSS 0.4% (higher than 25% of CVEs)Published 2025-08-14Updated 2025-08-14Assigner: PostgreSQL

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.

CWE-1230

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

57Fixed
50Fix pending
10Will not fix

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.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 25.10postgresql-17Fixed17.6-1UBUNTU-CVE-2025-8713
Ubuntu 24.04postgresql-16Fixed16.10-0ubuntu0.24.04.1UBUNTU-CVE-2025-8713
Ubuntu 22.04postgresql-14Fixed14.19-0ubuntu0.22.04.1UBUNTU-CVE-2025-8713
Ubuntu 20.04postgresql-12Fix pendingUBUNTU-CVE-2025-8713
Ubuntu 18.04postgresql-10Fix pendingUBUNTU-CVE-2025-8713
Ubuntu 16.04postgresql-9.5Fix pendingUBUNTU-CVE-2025-8713
Ubuntu 14.04postgresql-9.3Fix pendingUBUNTU-CVE-2025-8713
Debian 13postgresql-17Fixed17.6-0+deb13u1DEBIAN-CVE-2025-8713
Debian 12postgresql-15Fixed15.14-0+deb12u1DEBIAN-CVE-2025-8713
Red Hat Enterprise Linux 10postgresqlFix pending
Affected
Red Hat Enterprise Linux 10postgresql-contribFix pending
Affected
Red Hat Enterprise Linux 10postgresql-docsFix pending
Affected
Red Hat Enterprise Linux 10postgresql-plperlFix pending
Affected
Red Hat Enterprise Linux 10postgresql-plpython3Fix pending
Affected
Red Hat Enterprise Linux 10postgresql-pltclFix pending
Affected
Red Hat Enterprise Linux 10postgresql-private-develFix pending
Affected
Red Hat Enterprise Linux 10postgresql-private-libsFix pending
Affected
Red Hat Enterprise Linux 10postgresql-serverFix pending
Affected
Red Hat Enterprise Linux 10postgresql-server-develFix pending
Affected
Red Hat Enterprise Linux 10postgresql-staticFix pending
Affected
Red Hat Enterprise Linux 10postgresql-testFix pending
Affected
Red Hat Enterprise Linux 10postgresql-test-rpm-macrosFix pending
Affected
Red Hat Enterprise Linux 10postgresql-upgradeFix pending
Affected
Red Hat Enterprise Linux 10postgresql-upgrade-develFix pending
Affected
Red Hat Enterprise Linux 10postgresql16Fix pending
Affected
Red Hat Enterprise Linux 9pg_repackFixed0:1.4.8-2.module+el9.5.0+22224+f5585c78RHSA-2025:14827
Red Hat Enterprise Linux 9pgauditFixed0:16.0-1.module+el9.4.0+20427+07482b8cRHSA-2025:14862
Red Hat Enterprise Linux 9pgvectorFixed0:0.6.2-2.module+el9.6.0+22979+c3d78d52RHSA-2025:14827
Red Hat Enterprise Linux 9postgres-decoderbufsFixed0:2.4.0-1.Final.module+el9.4.0+20427+07482b8cRHSA-2025:14862
Red Hat Enterprise Linux 9postgresqlFixed0:16.10-1.module+el9.6.0+23420+848a4539RHSA-2025:14878
Red Hat Enterprise Linux 9postgresql-contribFixed0:15.14-1.module+el9.6.0+23419+7863ab62RHSA-2025:14878
Red Hat Enterprise Linux 9postgresql-docsFixed0:15.14-1.module+el9.6.0+23419+7863ab62RHSA-2025:14878
Red Hat Enterprise Linux 9postgresql-plperlFixed0:13.22-1.el9_6RHSA-2025:14827
Red Hat Enterprise Linux 9postgresql-plpython3Fixed0:13.22-1.el9_6RHSA-2025:14827
Red Hat Enterprise Linux 9postgresql-pltclFixed0:13.22-1.el9_6RHSA-2025:14827
Red Hat Enterprise Linux 9postgresql-private-develFixed0:15.14-1.module+el9.6.0+23419+7863ab62RHSA-2025:14878
Red Hat Enterprise Linux 9postgresql-private-libsFixed0:13.22-1.el9_6RHSA-2025:14862
Red Hat Enterprise Linux 9postgresql-serverFixed0:13.22-1.el9_6RHSA-2025:14862
Red Hat Enterprise Linux 9postgresql-server-develFixed0:13.22-1.el9_6RHSA-2025:14827
Red Hat Enterprise Linux 9postgresql-staticFixed0:15.14-1.module+el9.6.0+23419+7863ab62RHSA-2025:14827
Red Hat Enterprise Linux 9postgresql-testFixed0:16.10-1.module+el9.6.0+23420+848a4539RHSA-2025:14862
Red Hat Enterprise Linux 9postgresql-test-rpm-macrosFixed0:13.22-1.el9_6RHSA-2025:14862
Red Hat Enterprise Linux 9postgresql-upgradeFixed0:13.22-1.el9_6RHSA-2025:14827
Red Hat Enterprise Linux 9postgresql-upgrade-develFixed0:15.14-1.module+el9.6.0+23419+7863ab62RHSA-2025:14827
Red Hat Enterprise Linux 8pg_repackFix pending
Affected
Red Hat Enterprise Linux 8pgauditFix pending
Affected
Red Hat Enterprise Linux 8postgres-decoderbufsFix pending
Affected
Red Hat Enterprise Linux 8postgresqlFix pending
Affected
Red Hat Enterprise Linux 8postgresql-contribFix pending
Affected
Red Hat Enterprise Linux 8postgresql-docsFix pending
Affected
Red Hat Enterprise Linux 8postgresql-plperlFix pending
Affected
Red Hat Enterprise Linux 8postgresql-plpython3Fix pending
Affected
Red Hat Enterprise Linux 8postgresql-pltclFix pending
Affected
Red Hat Enterprise Linux 8postgresql-private-develFix pending
Affected
Red Hat Enterprise Linux 8postgresql-private-libsFix pending
Affected
Red Hat Enterprise Linux 8postgresql-serverFix pending
Affected
Red Hat Enterprise Linux 8postgresql-server-develFix pending
Affected
Red Hat Enterprise Linux 8postgresql-staticFix pending
Affected
Red Hat Enterprise Linux 8postgresql-testFix pending
Affected
Red Hat Enterprise Linux 8postgresql-test-rpm-macrosFix pending
Affected
Red Hat Enterprise Linux 8postgresql-upgradeFix pending
Affected
Red Hat Enterprise Linux 8postgresql-upgrade-develFix pending
Affected
Red Hat Enterprise Linux 7postgresqlFix pending
Fix deferred
Red Hat Enterprise Linux 7postgresql-contribFix pending
Fix deferred
Red Hat Enterprise Linux 7postgresql-develFix pending
Fix deferred
Red Hat Enterprise Linux 7postgresql-docsFix pending
Fix deferred
Red Hat Enterprise Linux 7postgresql-libsFix pending
Fix deferred
Red Hat Enterprise Linux 7postgresql-plperlFix pending
Fix deferred
Red Hat Enterprise Linux 7postgresql-plpythonFix pending
Fix deferred
Red Hat Enterprise Linux 7postgresql-pltclFix pending
Fix deferred
Red Hat Enterprise Linux 7postgresql-serverFix pending
Fix deferred
Red Hat Enterprise Linux 7postgresql-staticFix pending
Fix deferred
Red Hat Enterprise Linux 7postgresql-testFix pending
Fix deferred
Red Hat Enterprise Linux 7postgresql-upgradeFix pending
Fix deferred
Red Hat Enterprise Linux 6postgresqlWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-contribWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-develWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-docsWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-libsWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-plperlWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-plpythonWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-pltclWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-serverWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-testWill not fix
Out of support scope
AlmaLinux 9pg_repackFixed1.4.8-2.module_el9.5.0+119+18833d03ALSA-2025:14827
AlmaLinux 9pgauditFixed1.7.0-1.module_el9.3.0+52+21733919ALSA-2025:14827
AlmaLinux 9pgvectorFixed0.6.2-2.module_el9.6.0+167+4e561146ALSA-2025:14827
AlmaLinux 9postgres-decoderbufsFixed2.4.0-1.Final.module_el9.4.0+66+eb9878bcALSA-2025:14862
AlmaLinux 9postgresqlFixed16.10-1.module_el9.6.0+174+80cb77f0ALSA-2025:14862
AlmaLinux 9postgresql-contribFixed16.10-1.module_el9.6.0+174+80cb77f0ALSA-2025:14862
AlmaLinux 9postgresql-docsFixed16.10-1.module_el9.6.0+174+80cb77f0ALSA-2025:14862
AlmaLinux 9postgresql-plperlFixed15.14-1.module_el9.6.0+176+c508cfa2ALSA-2025:14827
AlmaLinux 9postgresql-plpython3Fixed16.10-1.module_el9.6.0+174+80cb77f0ALSA-2025:14862
AlmaLinux 9postgresql-pltclFixed16.10-1.module_el9.6.0+174+80cb77f0ALSA-2025:14862
AlmaLinux 9postgresql-private-develFixed16.10-1.module_el9.6.0+174+80cb77f0ALSA-2025:14862
AlmaLinux 9postgresql-private-libsFixed16.10-1.module_el9.6.0+174+80cb77f0ALSA-2025:14862
AlmaLinux 9postgresql-serverFixed15.14-1.module_el9.6.0+176+c508cfa2ALSA-2025:14827
AlmaLinux 9postgresql-server-develFixed15.14-1.module_el9.6.0+176+c508cfa2ALSA-2025:14827
AlmaLinux 9postgresql-staticFixed16.10-1.module_el9.6.0+174+80cb77f0ALSA-2025:14862
AlmaLinux 9postgresql-testFixed15.14-1.module_el9.6.0+176+c508cfa2ALSA-2025:14827
AlmaLinux 9postgresql-test-rpm-macrosFixed15.14-1.module_el9.6.0+176+c508cfa2ALSA-2025:14827
AlmaLinux 9postgresql-upgradeFixed15.14-1.module_el9.6.0+176+c508cfa2ALSA-2025:14827
AlmaLinux 9postgresql-upgrade-develFixed16.10-1.module_el9.6.0+174+80cb77f0ALSA-2025:14862
Alpine Linux 3.24postgresql16Fixed16.10-r0ALPINE-CVE-2025-8713
Alpine Linux 3.24postgresql17Fixed17.6-r0ALPINE-CVE-2025-8713
Alpine Linux 3.23postgresql16Fixed16.10-r0ALPINE-CVE-2025-8713
Alpine Linux 3.23postgresql17Fixed17.6-r0ALPINE-CVE-2025-8713
Alpine Linux 3.22postgresql15Fixed15.14-r0ALPINE-CVE-2025-8713
Alpine Linux 3.22postgresql16Fixed16.10-r0ALPINE-CVE-2025-8713
Alpine Linux 3.22postgresql17Fixed17.6-r0ALPINE-CVE-2025-8713
Alpine Linux 3.21postgresql15Fixed15.17-r0ALPINE-CVE-2025-8713
Alpine Linux 3.21postgresql16Fixed16.10-r0ALPINE-CVE-2025-8713
Alpine Linux 3.21postgresql17Fixed17.6-r0ALPINE-CVE-2025-8713
Alpine Linux 3.20postgresql15Fixed15.14-r0ALPINE-CVE-2025-8713
Alpine Linux 3.20postgresql16Fixed16.10-r0ALPINE-CVE-2025-8713
Alpine Linux 3.19postgresql15Fixed15.14-r0ALPINE-CVE-2025-8713
Alpine Linux 3.19postgresql16Fixed16.10-r0ALPINE-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.

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.