CVE-2024-4317PostgreSQL pg_stats_ext and pg_stats_ext_exprs lack authorization checks
Missing authorization in PostgreSQL built-in views pg_stats_ext and pg_stats_ext_exprs allows an unprivileged database user to read most common values and other statistics from CREATE STATISTICS commands of other users. The most common values may reveal column values the eavesdropper could not otherwise read or results of functions they cannot execute. Installing an unaffected version only fixes fresh PostgreSQL installations, namely those that are created with the initdb utility after installing that version. Current PostgreSQL installations will remain vulnerable until they follow the instructions in the release notes. Within major versions 14-16, minor versions before PostgreSQL 16.3, 15.7, and 14.12 are affected. Versions before PostgreSQL 14 are unaffected.
What to do
Fixed builds are available from AlmaLinux, Debian, Red Hat, Rocky Linux, Ubuntu: see the table below for the fixed version per release.
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
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.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 24.04 | postgresql-16 | Fixed | 16.3-0ubuntu0.24.04.1 | UBUNTU-CVE-2024-4317 |
| Ubuntu 22.04 | postgresql-14 | Fixed | 14.12-0ubuntu0.22.04.1 | UBUNTU-CVE-2024-4317 |
| Ubuntu 20.04 | postgresql-12 | Not affected vulnerable_code_not_present | ||
| Debian 12 | postgresql-15 | Fixed | 15.7-0+deb12u1 | DEBIAN-CVE-2024-4317 |
| Red Hat Enterprise Linux 10 | postgresql | Not affected | ||
| Red Hat Enterprise Linux 10 | postgresql-contrib | Not affected | ||
| Red Hat Enterprise Linux 10 | postgresql-docs | Not affected | ||
| Red Hat Enterprise Linux 10 | postgresql-plperl | Not affected | ||
| Red Hat Enterprise Linux 10 | postgresql-plpython3 | Not affected | ||
| Red Hat Enterprise Linux 10 | postgresql-pltcl | Not affected | ||
| Red Hat Enterprise Linux 10 | postgresql-private-devel | Not affected | ||
| Red Hat Enterprise Linux 10 | postgresql-private-libs | Not affected | ||
| Red Hat Enterprise Linux 10 | postgresql-server | Not affected | ||
| Red Hat Enterprise Linux 10 | postgresql-server-devel | Not affected | ||
| Red Hat Enterprise Linux 10 | postgresql-static | Not affected | ||
| Red Hat Enterprise Linux 10 | postgresql-test | Not affected | ||
| Red Hat Enterprise Linux 10 | postgresql-test-rpm-macros | Not affected | ||
| Red Hat Enterprise Linux 10 | postgresql-upgrade | Not affected | ||
| Red Hat Enterprise Linux 10 | postgresql-upgrade-devel | Not affected | ||
| Red Hat Enterprise Linux 10 | postgresql16 | Not affected | ||
| Red Hat Enterprise Linux 9 | pg_repack | Fixed | 0:1.4.8-1.module+el9.2.0+17405+aeb9ec60 | RHSA-2024:5929 |
| Red Hat Enterprise Linux 9 | pgaudit | Fixed | 0:16.0-1.module+el9.4.0+20427+07482b8c | RHSA-2024:6020 |
| Red Hat Enterprise Linux 9 | postgres-decoderbufs | Fixed | 0:1.9.7-1.Final.module+el9.2.0+17405+aeb9ec60 | RHSA-2024:5929 |
| Red Hat Enterprise Linux 9 | postgresql | Fixed | 0:15.8-1.module+el9.4.0+22208+cd6b92ff | RHSA-2024:5929 |
| Red Hat Enterprise Linux 9 | postgresql-contrib | Fixed | 0:16.4-1.module+el9.4.0+22207+8466e31f | RHSA-2024:6020 |
| Red Hat Enterprise Linux 9 | postgresql-docs | Fixed | 0:16.4-1.module+el9.4.0+22207+8466e31f | RHSA-2024:6020 |
| Red Hat Enterprise Linux 9 | postgresql-plperl | Fixed | 0:16.4-1.module+el9.4.0+22207+8466e31f | RHSA-2024:6020 |
| Red Hat Enterprise Linux 9 | postgresql-plpython3 | Fixed | 0:15.8-1.module+el9.4.0+22208+cd6b92ff | RHSA-2024:5929 |
| Red Hat Enterprise Linux 9 | postgresql-pltcl | Fixed | 0:15.8-1.module+el9.4.0+22208+cd6b92ff | RHSA-2024:5929 |
| Red Hat Enterprise Linux 9 | postgresql-private-devel | Fixed | 0:16.4-1.module+el9.4.0+22207+8466e31f | RHSA-2024:6020 |
| Red Hat Enterprise Linux 9 | postgresql-private-libs | Fixed | 0:15.8-1.module+el9.4.0+22208+cd6b92ff | RHSA-2024:5929 |
| Red Hat Enterprise Linux 9 | postgresql-server | Fixed | 0:15.8-1.module+el9.4.0+22208+cd6b92ff | RHSA-2024:5929 |
| Red Hat Enterprise Linux 9 | postgresql-server-devel | Fixed | 0:16.4-1.module+el9.4.0+22207+8466e31f | RHSA-2024:6020 |
| Red Hat Enterprise Linux 9 | postgresql-static | Fixed | 0:16.4-1.module+el9.4.0+22207+8466e31f | RHSA-2024:6020 |
| Red Hat Enterprise Linux 9 | postgresql-test | Fixed | 0:16.4-1.module+el9.4.0+22207+8466e31f | RHSA-2024:6020 |
| Red Hat Enterprise Linux 9 | postgresql-test-rpm-macros | Fixed | 0:16.4-1.module+el9.4.0+22207+8466e31f | RHSA-2024:6020 |
| Red Hat Enterprise Linux 9 | postgresql-upgrade | Fixed | 0:15.8-1.module+el9.4.0+22208+cd6b92ff | RHSA-2024:5929 |
| Red Hat Enterprise Linux 9 | postgresql-upgrade-devel | Fixed | 0:16.4-1.module+el9.4.0+22207+8466e31f | RHSA-2024:6020 |
| Red Hat Enterprise Linux 8 | pg_repack | Fixed | 0:1.4.8-1.module+el8.10.0+20413+d8116364 | RHSA-2024:6001 |
| Red Hat Enterprise Linux 8 | pgaudit | Fixed | 0:1.7.0-1.module+el8.9.0+19797+c4ce5969 | RHSA-2024:5927 |
| Red Hat Enterprise Linux 8 | postgres-decoderbufs | Fixed | 0:2.4.0-1.Final.module+el8.10.0+20413+d8116364 | RHSA-2024:6001 |
| Red Hat Enterprise Linux 8 | postgresql | Fixed | 0:15.8-1.module+el8.10.0+22212+a51fe170 | RHSA-2024:5927 |
| Red Hat Enterprise Linux 8 | postgresql-contrib | Fixed | 0:15.8-1.module+el8.10.0+22212+a51fe170 | RHSA-2024:5927 |
| Red Hat Enterprise Linux 8 | postgresql-docs | Fixed | 0:16.4-1.module+el8.10.0+22209+060d7a0a | RHSA-2024:6001 |
| Red Hat Enterprise Linux 8 | postgresql-plperl | Fixed | 0:16.4-1.module+el8.10.0+22209+060d7a0a | RHSA-2024:6001 |
| Red Hat Enterprise Linux 8 | postgresql-plpython3 | Fixed | 0:15.8-1.module+el8.10.0+22212+a51fe170 | RHSA-2024:5927 |
| Red Hat Enterprise Linux 8 | postgresql-pltcl | Fixed | 0:15.8-1.module+el8.10.0+22212+a51fe170 | RHSA-2024:5927 |
| Red Hat Enterprise Linux 8 | postgresql-private-devel | Fixed | 0:16.4-1.module+el8.10.0+22209+060d7a0a | RHSA-2024:6001 |
| Red Hat Enterprise Linux 8 | postgresql-private-libs | Fixed | 0:16.4-1.module+el8.10.0+22209+060d7a0a | RHSA-2024:6001 |
| Red Hat Enterprise Linux 8 | postgresql-server | Fixed | 0:15.8-1.module+el8.10.0+22212+a51fe170 | RHSA-2024:5927 |
| Red Hat Enterprise Linux 8 | postgresql-server-devel | Fixed | 0:16.4-1.module+el8.10.0+22209+060d7a0a | RHSA-2024:6001 |
| Red Hat Enterprise Linux 8 | postgresql-static | Fixed | 0:15.8-1.module+el8.10.0+22212+a51fe170 | RHSA-2024:5927 |
| Red Hat Enterprise Linux 8 | postgresql-test | Fixed | 0:16.4-1.module+el8.10.0+22209+060d7a0a | RHSA-2024:6001 |
| Red Hat Enterprise Linux 8 | postgresql-test-rpm-macros | Fixed | 0:15.8-1.module+el8.10.0+22212+a51fe170 | RHSA-2024:5927 |
| Red Hat Enterprise Linux 8 | postgresql-upgrade | Fixed | 0:16.4-1.module+el8.10.0+22209+060d7a0a | RHSA-2024:6001 |
| Red Hat Enterprise Linux 8 | postgresql-upgrade-devel | Fixed | 0:15.8-1.module+el8.10.0+22212+a51fe170 | RHSA-2024:5927 |
| Red Hat Enterprise Linux 7 | postgresql | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | postgresql-contrib | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | postgresql-devel | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | postgresql-docs | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | postgresql-libs | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | postgresql-plperl | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | postgresql-plpython | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | postgresql-pltcl | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | postgresql-server | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | postgresql-static | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | postgresql-test | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | postgresql-upgrade | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-contrib | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-devel | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-docs | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-libs | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-plperl | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-plpython | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-pltcl | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-server | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-test | Will not fix Out of support scope | ||
| AlmaLinux 9 | pg_repack | Fixed | 1.4.8-1.module_el9.3.0+52+21733919 | ALSA-2024:5929 |
| AlmaLinux 9 | pgaudit | Fixed | 1.7.0-1.module_el9.3.0+52+21733919 | ALSA-2024:5929 |
| AlmaLinux 9 | postgres-decoderbufs | Fixed | 1.9.7-1.Final.module_el9.3.0+52+21733919 | ALSA-2024:5929 |
| AlmaLinux 9 | postgresql | Fixed | 15.8-1.module_el9.4.0+111+667b9e9e | ALSA-2024:5929 |
| AlmaLinux 9 | postgresql-contrib | Fixed | 15.8-1.module_el9.4.0+111+667b9e9e | ALSA-2024:5929 |
| AlmaLinux 9 | postgresql-docs | Fixed | 16.4-1.module_el9.4.0+109+624ac33a | ALSA-2024:6020 |
| AlmaLinux 9 | postgresql-plperl | Fixed | 15.8-1.module_el9.4.0+111+667b9e9e | ALSA-2024:5929 |
| AlmaLinux 9 | postgresql-plpython3 | Fixed | 16.4-1.module_el9.4.0+109+624ac33a | ALSA-2024:6020 |
| AlmaLinux 9 | postgresql-pltcl | Fixed | 15.8-1.module_el9.4.0+111+667b9e9e | ALSA-2024:5929 |
| AlmaLinux 9 | postgresql-private-devel | Fixed | 15.8-1.module_el9.4.0+111+667b9e9e | ALSA-2024:5929 |
| AlmaLinux 9 | postgresql-private-libs | Fixed | 16.4-1.module_el9.4.0+109+624ac33a | ALSA-2024:6020 |
| AlmaLinux 9 | postgresql-server | Fixed | 15.8-1.module_el9.4.0+111+667b9e9e | ALSA-2024:5929 |
| AlmaLinux 9 | postgresql-server-devel | Fixed | 15.8-1.module_el9.4.0+111+667b9e9e | ALSA-2024:5929 |
| AlmaLinux 9 | postgresql-static | Fixed | 16.4-1.module_el9.4.0+109+624ac33a | ALSA-2024:6020 |
| AlmaLinux 9 | postgresql-test | Fixed | 15.8-1.module_el9.4.0+111+667b9e9e | ALSA-2024:5929 |
| AlmaLinux 9 | postgresql-test-rpm-macros | Fixed | 16.4-1.module_el9.4.0+109+624ac33a | ALSA-2024:6020 |
| AlmaLinux 9 | postgresql-upgrade | Fixed | 15.8-1.module_el9.4.0+111+667b9e9e | ALSA-2024:5929 |
| AlmaLinux 9 | postgresql-upgrade-devel | Fixed | 16.4-1.module_el9.4.0+109+624ac33a | ALSA-2024:6020 |
| AlmaLinux 8 | pg_repack | Fixed | 1.4.8-1.module_el8.9.0+3706+885c732e | ALSA-2024:5927 |
| AlmaLinux 8 | pgaudit | Fixed | 16.0-1.module_el8.10.0+3798+606ebb9f | ALSA-2024:6001 |
| AlmaLinux 8 | postgres-decoderbufs | Fixed | 1.9.7-1.Final.module_el8.9.0+3706+885c732e | ALSA-2024:5927 |
| AlmaLinux 8 | postgresql | Fixed | 16.4-1.module_el8.10.0+3884+a79fbae6 | ALSA-2024:6001 |
| AlmaLinux 8 | postgresql-contrib | Fixed | 15.8-1.module_el8.10.0+3888+1aead837 | ALSA-2024:5927 |
| AlmaLinux 8 | postgresql-docs | Fixed | 16.4-1.module_el8.10.0+3884+a79fbae6 | ALSA-2024:6001 |
| AlmaLinux 8 | postgresql-plperl | Fixed | 16.4-1.module_el8.10.0+3884+a79fbae6 | ALSA-2024:6001 |
| AlmaLinux 8 | postgresql-plpython3 | Fixed | 15.8-1.module_el8.10.0+3888+1aead837 | ALSA-2024:5927 |
| AlmaLinux 8 | postgresql-pltcl | Fixed | 16.4-1.module_el8.10.0+3884+a79fbae6 | ALSA-2024:6001 |
| AlmaLinux 8 | postgresql-private-devel | Fixed | 15.8-1.module_el8.10.0+3888+1aead837 | ALSA-2024:5927 |
| AlmaLinux 8 | postgresql-private-libs | Fixed | 16.4-1.module_el8.10.0+3884+a79fbae6 | ALSA-2024:6001 |
| AlmaLinux 8 | postgresql-server | Fixed | 16.4-1.module_el8.10.0+3884+a79fbae6 | ALSA-2024:6001 |
| AlmaLinux 8 | postgresql-server-devel | Fixed | 15.8-1.module_el8.10.0+3888+1aead837 | ALSA-2024:5927 |
| AlmaLinux 8 | postgresql-static | Fixed | 16.4-1.module_el8.10.0+3884+a79fbae6 | ALSA-2024:6001 |
| AlmaLinux 8 | postgresql-test | Fixed | 16.4-1.module_el8.10.0+3884+a79fbae6 | ALSA-2024:6001 |
| AlmaLinux 8 | postgresql-test-rpm-macros | Fixed | 15.8-1.module_el8.10.0+3888+1aead837 | ALSA-2024:5927 |
| AlmaLinux 8 | postgresql-upgrade | Fixed | 16.4-1.module_el8.10.0+3884+a79fbae6 | ALSA-2024:6001 |
| AlmaLinux 8 | postgresql-upgrade-devel | Fixed | 16.4-1.module_el8.10.0+3884+a79fbae6 | ALSA-2024:6001 |
| Rocky Linux 9 | pgaudit | Fixed | 0:16.0-1.module+el9.5.0+30638+72f697e1 | RLSA-2024:6020 |
| Rocky Linux 9 | postgres-decoderbufs | Fixed | 0:1.9.7-1.Final.module+el9.5.0+30637+4391fcca | RLSA-2024:5929 |
| Rocky Linux 8 | pg_repack | Fixed | 0:1.4.8-1.module+el8.9.0+1525+fc91df60 | RLSA-2024:5927 |
| Rocky Linux 8 | pgaudit | Fixed | 0:16.0-1.module+el8.10.0+1622+bd25b19c | RLSA-2024:6001 |
| Rocky Linux 8 | postgres-decoderbufs | Fixed | 0:2.4.0-1.Final.module+el8.10.0+1622+bd25b19c | RLSA-2024:6001 |
| Rocky Linux 8 | postgresql | Fixed | 0:15.8-1.module+el8.10.0+1864+f5aa9248 | RLSA-2024:5927 |
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.
- PostgreSQL: affected: 16 to before 16.3, 15 to before 15.7, 14 to before 14.12; fixed in
16.3,15.7,14.12
Workaround: apply corrected view definitions; see PostgreSQL release notes
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.