CVEfocus › CVE database › CVE-2025-12817

CVE-2025-12817PostgreSQL CREATE STATISTICS does not check for schema CREATE privilege

CVSS 3.1 LowEPSS 0.3% (higher than 21% of CVEs)Published 2025-11-13Updated 2025-11-13Assigner: PostgreSQL

Missing authorization in PostgreSQL CREATE STATISTICS command allows a table owner to achieve denial of service against other CREATE STATISTICS users by creating in any schema. A later CREATE STATISTICS for the same name, from a user having the CREATE privilege, would then fail. Versions before PostgreSQL 18.1, 17.7, 16.11, 15.15, 14.20, and 13.23 are affected.

CWE-862

What to do

Fixed builds are available from AlmaLinux, Alpine, Debian, Red Hat, Rocky Linux, Ubuntu: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

133Fixed
4Fix pending
22Will not fix

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04postgresql-18Fixed18.1-1ubuntu1UBUNTU-CVE-2025-12817
Ubuntu 25.10postgresql-17Fixed17.7-0ubuntu0.25.10.1UBUNTU-CVE-2025-12817
Ubuntu 24.04postgresql-16Fixed16.11-0ubuntu0.24.04.1UBUNTU-CVE-2025-12817
Ubuntu 22.04postgresql-14Fixed14.20-0ubuntu0.22.04.1UBUNTU-CVE-2025-12817
Ubuntu 20.04postgresql-12Fix pendingUBUNTU-CVE-2025-12817
Ubuntu 18.04postgresql-10Fix pendingUBUNTU-CVE-2025-12817
Ubuntu 16.04postgresql-9.5Fix pendingUBUNTU-CVE-2025-12817
Ubuntu 14.04postgresql-9.3Fix pendingUBUNTU-CVE-2025-12817
Debian 14postgresql-18Fixed18.1-1DEBIAN-CVE-2025-12817
Debian 13postgresql-17Fixed17.7-0+deb13u1DEBIAN-CVE-2025-12817
Debian 12postgresql-15Fixed15.15-0+deb12u1DEBIAN-CVE-2025-12817
Red Hat Enterprise Linux 10postgresqlFixed0:16.11-1.el10_1RHSA-2026:0525
Red Hat Enterprise Linux 10postgresql-contribFixed0:16.11-1.el10_1RHSA-2026:0525
Red Hat Enterprise Linux 10postgresql-docsFixed0:16.11-1.el10_1RHSA-2026:0525
Red Hat Enterprise Linux 10postgresql-plperlFixed0:16.11-1.el10_1RHSA-2026:0525
Red Hat Enterprise Linux 10postgresql-plpython3Fixed0:16.11-1.el10_1RHSA-2026:0525
Red Hat Enterprise Linux 10postgresql-pltclFixed0:16.11-1.el10_1RHSA-2026:0525
Red Hat Enterprise Linux 10postgresql-private-develFixed0:16.11-1.el10_1RHSA-2026:0525
Red Hat Enterprise Linux 10postgresql-private-libsFixed0:16.11-1.el10_1RHSA-2026:0525
Red Hat Enterprise Linux 10postgresql-serverFixed0:16.11-1.el10_1RHSA-2026:0525
Red Hat Enterprise Linux 10postgresql-server-develFixed0:16.11-1.el10_1RHSA-2026:0525
Red Hat Enterprise Linux 10postgresql-staticFixed0:16.11-1.el10_1RHSA-2026:0525
Red Hat Enterprise Linux 10postgresql-testFixed0:16.11-1.el10_1RHSA-2026:0525
Red Hat Enterprise Linux 10postgresql-test-rpm-macrosFixed0:16.11-1.el10_1RHSA-2026:0525
Red Hat Enterprise Linux 10postgresql-upgradeFixed0:16.11-1.el10_1RHSA-2026:0525
Red Hat Enterprise Linux 10postgresql-upgrade-develFixed0:16.11-1.el10_1RHSA-2026:0525
Red Hat Enterprise Linux 10postgresql16Fixed0:16.11-1.el10_1RHSA-2026:0525
Red Hat Enterprise Linux 9pg_repackFixed0:1.5.1-1.module+el9.6.0+22880+6b241eecRHSA-2026:0492
Red Hat Enterprise Linux 9pgauditFixed0:16.0-1.module+el9.4.0+20427+07482b8cRHSA-2026:0492
Red Hat Enterprise Linux 9pgvectorFixed0:0.6.2-2.module+el9.6.0+22979+c3d78d52RHSA-2026:0493
Red Hat Enterprise Linux 9postgisFixed0:3.5.3-3.module+el9.7.0+23421+025f8139RHSA-2026:0493
Red Hat Enterprise Linux 9postgis-clientFixed0:3.5.3-3.module+el9.7.0+23421+025f8139RHSA-2026:0493
Red Hat Enterprise Linux 9postgis-docsFixed0:3.5.3-3.module+el9.7.0+23421+025f8139RHSA-2026:0493
Red Hat Enterprise Linux 9postgis-upgradeFixed0:3.5.3-3.module+el9.7.0+23421+025f8139RHSA-2026:0493
Red Hat Enterprise Linux 9postgis-utilsFixed0:3.5.3-3.module+el9.7.0+23421+025f8139RHSA-2026:0493
Red Hat Enterprise Linux 9postgres-decoderbufsFixed0:2.4.0-1.Final.module+el9.4.0+20427+07482b8cRHSA-2026:0492
Red Hat Enterprise Linux 9postgresqlFixed0:13.23-1.el9_7RHSA-2026:0492
Red Hat Enterprise Linux 9postgresql-contribFixed0:16.11-1.module+el9.7.0+23784+0c5a3b34RHSA-2026:0491
Red Hat Enterprise Linux 9postgresql-docsFixed0:15.15-2.module+el9.7.0+23785+f55bffc9RHSA-2026:0491
Red Hat Enterprise Linux 9postgresql-plperlFixed0:16.11-1.module+el9.7.0+23784+0c5a3b34RHSA-2026:0492
Red Hat Enterprise Linux 9postgresql-plpython3Fixed0:15.15-2.module+el9.7.0+23785+f55bffc9RHSA-2026:0493
Red Hat Enterprise Linux 9postgresql-pltclFixed0:16.11-1.module+el9.7.0+23784+0c5a3b34RHSA-2026:0492
Red Hat Enterprise Linux 9postgresql-private-develFixed0:16.11-1.module+el9.7.0+23784+0c5a3b34RHSA-2026:0491
Red Hat Enterprise Linux 9postgresql-private-libsFixed0:13.23-1.el9_7RHSA-2026:0492
Red Hat Enterprise Linux 9postgresql-serverFixed0:13.23-1.el9_7RHSA-2026:0493
Red Hat Enterprise Linux 9postgresql-server-develFixed0:15.15-2.module+el9.7.0+23785+f55bffc9RHSA-2026:0491
Red Hat Enterprise Linux 9postgresql-staticFixed0:16.11-1.module+el9.7.0+23784+0c5a3b34RHSA-2026:0491
Red Hat Enterprise Linux 9postgresql-testFixed0:16.11-1.module+el9.7.0+23784+0c5a3b34RHSA-2026:0492
Red Hat Enterprise Linux 9postgresql-test-rpm-macrosFixed0:15.15-2.module+el9.7.0+23785+f55bffc9RHSA-2026:0491
Red Hat Enterprise Linux 9postgresql-upgradeFixed0:15.15-2.module+el9.7.0+23785+f55bffc9RHSA-2026:0493
Red Hat Enterprise Linux 9postgresql-upgrade-develFixed0:16.11-1.module+el9.7.0+23784+0c5a3b34RHSA-2026:0491
Red Hat Enterprise Linux 8pg_repackFixed
Out of support scope
0:1.4.8-1.module+el8.9.0+19797+c4ce5969RHSA-2026:0523
Red Hat Enterprise Linux 8pgauditFixed
Out of support scope
0:1.5.0-1.module+el8.9.0+20664+9c30cf7fRHSA-2026:0524
Red Hat Enterprise Linux 8postgres-decoderbufsFixed
Out of support scope
0:1.9.7-1.Final.module+el8.9.0+19797+c4ce5969RHSA-2026:0523
Red Hat Enterprise Linux 8postgresqlFixed
Out of support scope
0:13.23-1.module+el8.10.0+23781+c6a61bc8RHSA-2026:0519
Red Hat Enterprise Linux 8postgresql-contribFixed
Out of support scope
0:15.15-1.module+el8.10.0+23782+2d6b2a31RHSA-2026:0519
Red Hat Enterprise Linux 8postgresql-docsFixed
Out of support scope
0:15.15-1.module+el8.10.0+23782+2d6b2a31RHSA-2026:0523
Red Hat Enterprise Linux 8postgresql-plperlFixed
Out of support scope
0:13.23-1.module+el8.10.0+23781+c6a61bc8RHSA-2026:0524
Red Hat Enterprise Linux 8postgresql-plpython3Fixed
Out of support scope
0:13.23-1.module+el8.10.0+23781+c6a61bc8RHSA-2026:0524
Red Hat Enterprise Linux 8postgresql-pltclFixed
Out of support scope
0:15.15-1.module+el8.10.0+23782+2d6b2a31RHSA-2026:0519
Red Hat Enterprise Linux 8postgresql-private-develFixed
Out of support scope
0:16.11-1.module+el8.10.0+23783+d9790420RHSA-2026:0524
Red Hat Enterprise Linux 8postgresql-private-libsFixed
Out of support scope
0:15.15-1.module+el8.10.0+23782+2d6b2a31RHSA-2026:0519
Red Hat Enterprise Linux 8postgresql-serverFixed
Out of support scope
0:16.11-1.module+el8.10.0+23783+d9790420RHSA-2026:0523
Red Hat Enterprise Linux 8postgresql-server-develFixed
Out of support scope
0:13.23-1.module+el8.10.0+23781+c6a61bc8RHSA-2026:0519
Red Hat Enterprise Linux 8postgresql-staticFixed
Out of support scope
0:13.23-1.module+el8.10.0+23781+c6a61bc8RHSA-2026:0524
Red Hat Enterprise Linux 8postgresql-testFixed
Out of support scope
0:15.15-1.module+el8.10.0+23782+2d6b2a31RHSA-2026:0523
Red Hat Enterprise Linux 8postgresql-test-rpm-macrosFixed
Out of support scope
0:13.23-1.module+el8.10.0+23781+c6a61bc8RHSA-2026:0519
Red Hat Enterprise Linux 8postgresql-upgradeFixed
Out of support scope
0:13.23-1.module+el8.10.0+23781+c6a61bc8RHSA-2026:0524
Red Hat Enterprise Linux 8postgresql-upgrade-develFixed
Out of support scope
0:16.11-1.module+el8.10.0+23783+d9790420RHSA-2026:0523
Red Hat Enterprise Linux 7postgresqlWill not fix
Out of support scope
Red Hat Enterprise Linux 7postgresql-contribWill not fix
Out of support scope
Red Hat Enterprise Linux 7postgresql-develWill not fix
Out of support scope
Red Hat Enterprise Linux 7postgresql-docsWill not fix
Out of support scope
Red Hat Enterprise Linux 7postgresql-libsWill not fix
Out of support scope
Red Hat Enterprise Linux 7postgresql-plperlWill not fix
Out of support scope
Red Hat Enterprise Linux 7postgresql-plpythonWill not fix
Out of support scope
Red Hat Enterprise Linux 7postgresql-pltclWill not fix
Out of support scope
Red Hat Enterprise Linux 7postgresql-serverWill not fix
Out of support scope
Red Hat Enterprise Linux 7postgresql-staticWill not fix
Out of support scope
Red Hat Enterprise Linux 7postgresql-testWill not fix
Out of support scope
Red Hat Enterprise Linux 7postgresql-upgradeWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresqlWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-contribWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-develWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-docsWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-libsWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-plperlWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-plpythonWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-pltclWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-serverWill not fix
Out of support scope
Red Hat Enterprise Linux 6postgresql-testWill not fix
Out of support scope
AlmaLinux 10postgresql-test-rpm-macrosFixed16.11-1.el10_1ALSA-2026:0525
AlmaLinux 9pg_repackFixed1.4.8-2.module_el9.5.0+119+18833d03ALSA-2026:0493
AlmaLinux 9pgauditFixed1.7.0-1.module_el9.3.0+52+21733919ALSA-2026:0493
AlmaLinux 9pgvectorFixed0.6.2-2.module_el9.6.0+167+4e561146ALSA-2026:0493
AlmaLinux 9postgisFixed3.5.3-3.module_el9.7.0+187+2286ff0aALSA-2026:0493
AlmaLinux 9postgis-clientFixed3.5.3-3.module_el9.7.0+187+2286ff0aALSA-2026:0493
AlmaLinux 9postgis-docsFixed3.5.3-3.module_el9.7.0+187+2286ff0aALSA-2026:0493
AlmaLinux 9postgis-upgradeFixed3.5.3-3.module_el9.7.0+187+2286ff0aALSA-2026:0493
AlmaLinux 9postgis-utilsFixed3.5.3-3.module_el9.7.0+187+2286ff0aALSA-2026:0493
AlmaLinux 9postgres-decoderbufsFixed2.4.0-1.Final.module_el9.4.0+66+eb9878bcALSA-2026:0492
AlmaLinux 9postgresqlFixed15.15-2.module_el9.7.0+203+960b74c0ALSA-2026:0491
AlmaLinux 9postgresql-contribFixed16.11-1.module_el9.7.0+202+21427d8aALSA-2026:0491
AlmaLinux 9postgresql-docsFixed16.11-1.module_el9.7.0+202+21427d8aALSA-2026:0491
AlmaLinux 9postgresql-plperlFixed16.11-1.module_el9.7.0+202+21427d8aALSA-2026:0491
AlmaLinux 9postgresql-plpython3Fixed15.15-2.module_el9.7.0+203+960b74c0ALSA-2026:0493
AlmaLinux 9postgresql-pltclFixed13.23-1.el9_7ALSA-2026:0493
AlmaLinux 9postgresql-private-develFixed15.15-2.module_el9.7.0+203+960b74c0ALSA-2026:0491
AlmaLinux 9postgresql-private-libsFixed15.15-2.module_el9.7.0+203+960b74c0ALSA-2026:0493
AlmaLinux 9postgresql-serverFixed13.23-1.el9_7ALSA-2026:0492
AlmaLinux 9postgresql-server-develFixed15.15-2.module_el9.7.0+203+960b74c0ALSA-2026:0491
AlmaLinux 9postgresql-staticFixed15.15-2.module_el9.7.0+203+960b74c0ALSA-2026:0493
AlmaLinux 9postgresql-testFixed13.23-1.el9_7ALSA-2026:0492
AlmaLinux 9postgresql-test-rpm-macrosFixed13.23-1.el9_7ALSA-2026:0492
AlmaLinux 9postgresql-upgradeFixed13.23-1.el9_7ALSA-2026:0492
AlmaLinux 9postgresql-upgrade-develFixed16.11-1.module_el9.7.0+202+21427d8aALSA-2026:0491
AlmaLinux 8pg_repackFixed1.4.6-3.module_el8.6.0+3095+ee60d910ALSA-2026:0519
AlmaLinux 8pgauditFixed1.5.0-1.module_el8.6.0+2760+1746ec94ALSA-2026:0519
AlmaLinux 8postgres-decoderbufsFixed2.4.0-1.Final.module_el8.10.0+3798+606ebb9fALSA-2026:0524
AlmaLinux 8postgresqlFixed16.11-1.module_el8.10.0+4099+381a55d6ALSA-2026:0524
AlmaLinux 8postgresql-contribFixed13.23-1.module_el8.10.0+4097+ed3c9b5cALSA-2026:0519
AlmaLinux 8postgresql-docsFixed16.11-1.module_el8.10.0+4099+381a55d6ALSA-2026:0524
AlmaLinux 8postgresql-plperlFixed15.15-1.module_el8.10.0+4098+1f4e965cALSA-2026:0519
AlmaLinux 8postgresql-plpython3Fixed16.11-1.module_el8.10.0+4099+381a55d6ALSA-2026:0523
AlmaLinux 8postgresql-pltclFixed15.15-1.module_el8.10.0+4098+1f4e965cALSA-2026:0519
AlmaLinux 8postgresql-private-develFixed16.11-1.module_el8.10.0+4099+381a55d6ALSA-2026:0524
AlmaLinux 8postgresql-private-libsFixed16.11-1.module_el8.10.0+4099+381a55d6ALSA-2026:0524
AlmaLinux 8postgresql-serverFixed15.15-1.module_el8.10.0+4098+1f4e965cALSA-2026:0519
AlmaLinux 8postgresql-server-develFixed16.11-1.module_el8.10.0+4099+381a55d6ALSA-2026:0523
AlmaLinux 8postgresql-staticFixed16.11-1.module_el8.10.0+4099+381a55d6ALSA-2026:0523
AlmaLinux 8postgresql-testFixed13.23-1.module_el8.10.0+4097+ed3c9b5cALSA-2026:0524
AlmaLinux 8postgresql-test-rpm-macrosFixed15.15-1.module_el8.10.0+4098+1f4e965cALSA-2026:0523
AlmaLinux 8postgresql-upgradeFixed15.15-1.module_el8.10.0+4098+1f4e965cALSA-2026:0519
AlmaLinux 8postgresql-upgrade-develFixed16.11-1.module_el8.10.0+4099+381a55d6ALSA-2026:0523
Rocky Linux 9pg_repackFixed0:1.5.1-1.module+el9.7.0+40012+a654bbaaRLSA-2026:0492
Rocky Linux 9pgauditFixed0:1.7.0-1.module+el9.7.0+40011+28af63c9RLSA-2026:0493
Rocky Linux 9pgvectorFixed0:0.6.2-2.module+el9.7.0+40060+39463e08RLSA-2026:0493
Rocky Linux 9postgisFixed0:3.5.3-3.module+el9.7.0+40012+a654bbaaRLSA-2026:0493
Rocky Linux 9postgres-decoderbufsFixed0:2.4.0-1.Final.module+el9.7.0+40012+a654bbaaRLSA-2026:0493
Rocky Linux 9postgresqlFixed0:13.23-1.el9_7RLSA-2026:0493
Rocky Linux 8pg_repackFixed0:1.4.8-1.module+el8.10.0+40056+df351139RLSA-2026:0523
Rocky Linux 8pgauditFixed0:16.0-1.module+el8.10.0+1622+bd25b19cRLSA-2026:0519
Rocky Linux 8postgres-decoderbufsFixed0:0.10.0-2.module+el8.9.0+1594+4a6adae9RLSA-2026:0524
Rocky Linux 8postgresqlFixed0:13.23-1.module+el8.10.0+40055+b85d5ce2RLSA-2026:0519
Alpine Linux 3.24postgresql16Fixed16.11-r0ALPINE-CVE-2025-12817
Alpine Linux 3.24postgresql17Fixed17.7-r0ALPINE-CVE-2025-12817
Alpine Linux 3.24postgresql18Fixed18.1-r0ALPINE-CVE-2025-12817
Alpine Linux 3.23postgresql16Fixed16.11-r0ALPINE-CVE-2025-12817
Alpine Linux 3.23postgresql17Fixed17.7-r0ALPINE-CVE-2025-12817
Alpine Linux 3.23postgresql18Fixed18.1-r0ALPINE-CVE-2025-12817
Alpine Linux 3.22postgresql15Fixed15.15-r0ALPINE-CVE-2025-12817
Alpine Linux 3.22postgresql16Fixed16.11-r0ALPINE-CVE-2025-12817
Alpine Linux 3.22postgresql17Fixed17.7-r0ALPINE-CVE-2025-12817
Alpine Linux 3.21postgresql16Fixed16.11-r0ALPINE-CVE-2025-12817
Alpine Linux 3.21postgresql17Fixed17.7-r0ALPINE-CVE-2025-12817
Alpine Linux 3.20postgresql15Fixed15.15-r0ALPINE-CVE-2025-12817
Alpine Linux 3.20postgresql16Fixed16.11-r0ALPINE-CVE-2025-12817
Alpine Linux 3.19postgresql15Fixed15.15-r0ALPINE-CVE-2025-12817
Alpine Linux 3.19postgresql16Fixed16.11-r0ALPINE-CVE-2025-12817

What the vendor says

As published in the CVE record by PostgreSQL, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.