Skip to content

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

LowCVSS 3.1 EPSS 0.27%
Published
Updated
Exploit status
No public exploit known

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.

Affected products

ProductAffected versionsFixed in
azure linux postgresql(Azure Linux:3.0) < 16.10-1 16.10-1
cbl-mariner postgresql(CBL-Mariner:2.0) < 14.19-1 14.19-1
debian/postgresql-15(Debian:12) < 15.14-0+deb12u1 15.14-0+deb12u1
debian/postgresql-15(Debian:12) = 15.10-0+deb12u1 No fix listed
debian/postgresql-15(Debian:12) = 15.11-0+deb12u1 No fix listed
debian/postgresql-15(Debian:12) = 15.12-0+deb12u1 No fix listed
debian/postgresql-15(Debian:12) = 15.12-0+deb12u2 No fix listed
debian/postgresql-15(Debian:12) = 15.13-0+deb12u1 No fix listed
debian/postgresql-15(Debian:12) = 15.3-0+deb12u1 No fix listed
debian/postgresql-15(Debian:12) = 15.3-1 No fix listed
debian/postgresql-15(Debian:12) = 15.4-0+deb12u1 No fix listed
debian/postgresql-15(Debian:12) = 15.4-1 No fix listed
debian/postgresql-15(Debian:12) = 15.4-2 No fix listed
debian/postgresql-15(Debian:12) = 15.4-3 No fix listed
debian/postgresql-15(Debian:12) = 15.5-0+deb12u1 No fix listed
debian/postgresql-15(Debian:12) = 15.6-0+deb12u1 No fix listed
debian/postgresql-15(Debian:12) = 15.7-0+deb12u1 No fix listed
debian/postgresql-15(Debian:12) = 15.8-0+deb12u1 No fix listed
debian/postgresql-15(Debian:12) = 15.9-0+deb12u1 No fix listed
debian/postgresql-17(Debian:13) < 17.6-0+deb13u1 17.6-0+deb13u1
debian/postgresql-17(Debian:13) = 17.5-1 No fix listed
ubuntu/postgresql-14(Ubuntu:22.04) < 14.19-0ubuntu0.22.04.1 14.19-0ubuntu0.22.04.1
alpine/postgresql15(Alpine:v3.19) < 15.14-r0 15.14-r0
alpine/postgresql15(Alpine:v3.20) < 15.14-r0 15.14-r0
alpine/postgresql15(Alpine:v3.21) < 15.17-r0 15.17-r0
Show 12 more
ProductAffected versionsFixed in
alpine/postgresql15(Alpine:v3.22) < 15.14-r0 15.14-r0
alpine/postgresql16(Alpine:v3.19) < 16.10-r0 16.10-r0
alpine/postgresql16(Alpine:v3.20) < 16.10-r0 16.10-r0
alpine/postgresql16(Alpine:v3.21) < 16.10-r0 16.10-r0
alpine/postgresql16(Alpine:v3.22) < 16.10-r0 16.10-r0
alpine/postgresql16(Alpine:v3.23) < 16.10-r0 16.10-r0
alpine/postgresql16(Alpine:v3.24) < 16.10-r0 16.10-r0
alpine/postgresql17(Alpine:v3.21) < 17.6-r0 17.6-r0
alpine/postgresql17(Alpine:v3.22) < 17.6-r0 17.6-r0
alpine/postgresql17(Alpine:v3.23) < 17.6-r0 17.6-r0
alpine/postgresql17(Alpine:v3.24) < 17.6-r0 17.6-r0
ubuntu/postgresql-16(Ubuntu:24.04) < 16.10-0ubuntu0.24.04.1 16.10-0ubuntu0.24.04.1

References