CVE-2025-8713 PostgreSQL optimizer statistics can expose sampled data within a view, partition, or child table
Attackers can read sampled data from views or tables they cannot access by exploiting optimizer statistics, bypassing access controls.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-8713?
CVE-2025-8713 is a low-severity vulnerability in PostgreSQL, published on 14 Aug 2025. Any signed-in user can exploit it over the network, with no action from the victim.
Official 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.
Weakness: CWE-1230
Which versions are affected by CVE-2025-8713?
1 open source package ship an affected version, including postgresql.
| Package | Affected | Fixed in |
|---|---|---|
postgresql Bitnami | All versions | 13.22.0, 14.19.0, 15.14.0, 16.10.0, 17.6.0 |
How do I fix CVE-2025-8713?
Upgrade postgresql to a fixed version for your release line: 13.22.0, 14.19.0, 15.14.0 or 16.10.0.
Is CVE-2025-8713 being exploited?
There is no known exploitation of CVE-2025-8713 in the wild and no public exploit code.
Sources
Also known as ALPINE-CVE-2025-8713, AZL-66300, AZL-66321, BELL-CVE-2025-8713, BIT-postgresql-2025-8713, CLEANSTART-2026-LW24877 and 9 more.