# CVE-2025-8713: PostgreSQL optimizer statistics can expose sampled data within a view, partition, or child table

- Priority: **Routine**
- Reason: Not severe (CVSS 3.1, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2025-08-14 · Modified: 2025-08-14
- Aliases: ALPINE-CVE-2025-8713, UBUNTU-CVE-2025-8713, DEBIAN-CVE-2025-8713
- Record: https://cvemate.com/vulnerability/CVE-2025-8713 · JSON: https://cvemate.com/vulnerability/CVE-2025-8713/json

## Description

```text
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.
```

## Signals

- CVSS: 3.1 low (v3.1, CVE.org) CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N
- EPSS: 0.273%, percentile 20.947%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- alpine postgresql15 (Alpine Linux): \< 15.14-r0 \| \< 15.17-r0
- alpine postgresql16 (Alpine Linux): \< 16.10-r0
- alpine postgresql17 (Alpine Linux): \< 17.6-r0
- debian postgresql-15 (Debian): \< 15.14-0+deb12u1
- debian postgresql-17 (Debian): \< 17.6-0+deb13u1
- ubuntu postgresql-10 (Ubuntu): All versions (No fix recorded)
- ubuntu postgresql-12 (Ubuntu): All versions (No fix recorded)
- ubuntu postgresql-14 (Ubuntu): \< 14.19-0ubuntu0.22.04.1
- ubuntu postgresql-16 (Ubuntu): \< 16.10-0ubuntu0.24.04.1
- ubuntu postgresql-17 (Ubuntu): \< 17.6-1
- ubuntu postgresql-9.3 (Ubuntu): All versions (No fix recorded)
- ubuntu postgresql-9.5 (Ubuntu): All versions (No fix recorded)

## References

- <https://www.postgresql.org/support/security/CVE-2025-8713/>
- <https://security.alpinelinux.org/vuln/CVE-2025-8713>
- <https://ubuntu.com/security/CVE-2025-8713>
- <https://www.cve.org/CVERecord?id=CVE-2025-8713>
- <https://www.postgresql.org/about/news/postgresql-176-1610-1514-1419-1322-and-18-beta-3-released-3118/>
- <https://ubuntu.com/security/notices/USN-7741-1>
- <https://security-tracker.debian.org/tracker/CVE-2025-8713>
- <https://nvd.nist.gov/vuln/detail/CVE-2025-8713>

---

Data as of 2026-12-05T04:57:47.232Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
