CVE-2025-8713
Low · 3.1CVSS
3.1
EPSS
0.2%
Published
Aug 14, 2025
CISA due date
—
Cloudanix analysis
Some database users could see pieces of information they were never meant to access by exploiting how the system prepares queries.
- Exploitation
- Remote Authenticated
- Attacker needs
- Low Privilege
- Complexity
- Moderate
- Impact
- Data Exposure
- Component
- Application
- Class
- Information Disclosure
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
A user can craft a leaky operator to bypass view ACLs and row security policies, reading sampled column data such as histograms and most-common-values lists from inaccessible tables or partitions.
Why it matters to the business
Attackers with limited database access could view sensitive information that should have been hidden by views or row-level policies, increasing risk of data exposure in environments using affected PostgreSQL versions.
How an attack unfolds
An attacker with database login privileges creates or references a custom operator that leaks statistics during query planning, then issues queries against views or inherited tables to retrieve sampled data that row security or view permissions were meant to protect.
How to fix it
Upgrade PostgreSQL to 17.6, 16.10, 15.14, 14.19, or 13.22 or newer. For affected linux-lts packages update to version 6.12.41-r0.
How to confirm the fix worked
Confirm the running PostgreSQL version matches or exceeds a fixed release and verify that the linux-lts packages have been updated to 6.12.41-r0; re-test access from a low-privileged account to ensure sampled statistics are no longer visible.
Typical attack path
- Obtain limited database access with ability to create objects or execute queries
- Define a leaky operator that bypasses ACL and RLS checks on statistics
- Issue queries against protected views or partitioned tables to trigger statistics access
- Extract histogram or most-common-values data from the planner output
How to detect it
Review PostgreSQL query logs and audit logs for creation of custom operators followed by queries against protected views or tables; look for planner statistics exposure patterns in slow-query or error logs.
What your security team should do
- Apply the PostgreSQL or linux-lts package updates immediately
- Audit database users and revoke unnecessary privileges to create operators or access statistics views
- Review and tighten row security policies and view definitions where sensitive data is involved
The record
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.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Alpine:v3.19 | postgresql15 | 0 | 15.14-r0 |
| Alpine:v3.19 | postgresql16 | 0 | 16.10-r0 |
| Alpine:v3.20 | postgresql15 | 0 | 15.14-r0 |
| Alpine:v3.20 | postgresql16 | 0 | 16.10-r0 |
| Alpine:v3.21 | postgresql16 | 0 | 16.10-r0 |
| Alpine:v3.21 | postgresql17 | 0 | 17.6-r0 |
| Alpine:v3.22 | postgresql16 | 0 | 16.10-r0 |
| Alpine:v3.22 | postgresql17 | 0 | 17.6-r0 |
| Bitnami | postgresql | 0 | 13.22.0 |
| Debian:11 | postgresql-13 | 0 | 13.22-0+deb11u1 |
| Debian:12 | postgresql-15 | 0 | No fix |
| Debian:13 | postgresql-17 | 0 | No fix |
| Debian:14 | postgresql-17 | 0 | No fix |
| Mageia:9 | postgresql13 | 0 | 13.22-1.mga9 |
| Mageia:9 | postgresql15 | 0 | 15.14-1.mga9 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | postgresql16 | 0 | 16.10-150600.16.21.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | postgresql17 | 0 | 17.6-150600.13.16.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP7 | postgresql17 | 0 | 17.6-150600.13.16.1 |
| SUSE:Linux Enterprise Module for Legacy 15 SP6 | postgresql14 | 0 | 14.19-150600.16.20.1 |
| SUSE:Linux Enterprise Module for Legacy 15 SP6 | postgresql15 | 0 | 15.14-150600.16.20.1 |
| SUSE:Linux Enterprise Module for Legacy 15 SP7 | postgresql14 | 0 | 14.19-150600.16.20.1 |
| SUSE:Linux Enterprise Module for Legacy 15 SP7 | postgresql15 | 0 | 15.14-150600.16.20.1 |
| SUSE:Linux Enterprise Module for Legacy 15 SP7 | postgresql16 | 0 | 16.10-150600.16.21.1 |
| SUSE:Linux Enterprise Module for Package Hub 15 SP6 | postgresql14 | 0 | 14.19-150600.16.20.1 |
| SUSE:Linux Enterprise Module for Package Hub 15 SP6 | postgresql16 | 0 | 16.10-150600.16.21.1 |
| SUSE:Linux Enterprise Module for Package Hub 15 SP6 | postgresql17 | 0 | 17.6-150600.13.16.1 |
| SUSE:Linux Enterprise Module for Package Hub 15 SP7 | postgresql14 | 0 | 14.19-150600.16.20.1 |
| SUSE:Linux Enterprise Module for Package Hub 15 SP7 | postgresql16 | 0 | 16.10-150600.16.21.1 |
| SUSE:Linux Enterprise Module for Package Hub 15 SP7 | postgresql17 | 0 | 17.6-150600.13.16.1 |
| SUSE:Linux Enterprise Module for Server Applications 15 SP6 | postgresql16 | 0 | 16.10-150600.16.21.1 |
| SUSE:Linux Enterprise Module for Server Applications 15 SP6 | postgresql17 | 0 | 17.6-150600.13.16.1 |
| SUSE:Linux Enterprise Module for Server Applications 15 SP7 | postgresql16 | 0 | 16.10-150600.16.21.1 |
| SUSE:Linux Enterprise Module for Server Applications 15 SP7 | postgresql17 | 0 | 17.6-150600.13.16.1 |
| SUSE:Linux Enterprise Server 12 SP5-LTSS | postgresql14 | 0 | 14.19-3.60.1 |
| SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | postgresql14 | 0 | 14.19-3.60.1 |
| openSUSE:Leap 15.6 | postgresql13 | 0 | 13.22-150600.14.11.1 |
| openSUSE:Leap 15.6 | postgresql14 | 0 | 14.19-150600.16.20.1 |
| openSUSE:Leap 15.6 | postgresql15 | 0 | 15.14-150600.16.20.1 |
| openSUSE:Leap 15.6 | postgresql16 | 0 | 16.10-150600.16.21.1 |
| openSUSE:Leap 15.6 | postgresql17 | 0 | 17.6-150600.13.16.1 |
| openSUSE:Tumbleweed | postgresql13 | 0 | 13.22-1.1 |
| openSUSE:Tumbleweed | postgresql14 | 0 | 14.19-1.1 |
| openSUSE:Tumbleweed | postgresql15 | 0 | 15.14-1.1 |
| openSUSE:Tumbleweed | postgresql16 | 0 | 16.10-1.1 |
| openSUSE:Tumbleweed | postgresql17 | 0 | 17.6-1.1 |
Related vulnerabilities
- CVE-2025-8715 Improper neutralization of newlines in pg_dump in PostgreSQL allows a user of the origin… Also affects postgresql15
- CVE-2025-8714 Untrusted data inclusion in pg_dump in PostgreSQL allows a malicious superuser of the… Also affects postgresql15
- CVE-2025-4207 Buffer over-read in PostgreSQL GB18030 encoding validation allows a database input… Also affects postgresql15
- CVE-2025-1094 Improper neutralization of quoting syntax in PostgreSQL libpq functions… Also affects postgresql15
- CVE-2024-10979 Incorrect control of environment variables in PostgreSQL PL/Perl allows an unprivileged… Also affects postgresql15
- CVE-2024-10978 Incorrect privilege assignment in PostgreSQL allows a less-privileged application user to… Also affects postgresql15
- CVE-2024-10977 Client use of server error message in PostgreSQL allows a server not trusted under… Also affects postgresql15
- CVE-2024-10976 Incomplete tracking in PostgreSQL of tables with row security allows a reused query to… Also affects postgresql15