CVEfocus › CVE database › CVE-2024-4317

CVE-2024-4317PostgreSQL pg_stats_ext and pg_stats_ext_exprs lack authorization checks

CVSS 3.1 LowEPSS 0.6% (higher than 46% of CVEs)Published 2024-05-09Updated 2025-03-28Assigner: PostgreSQL

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.

CWE-862

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

81Fixed
22Will not fix
17Not affected

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 24.04postgresql-16Fixed16.3-0ubuntu0.24.04.1UBUNTU-CVE-2024-4317
Ubuntu 22.04postgresql-14Fixed14.12-0ubuntu0.22.04.1UBUNTU-CVE-2024-4317
Ubuntu 20.04postgresql-12Not affected
vulnerable_code_not_present
Debian 12postgresql-15Fixed15.7-0+deb12u1DEBIAN-CVE-2024-4317
Red Hat Enterprise Linux 10postgresqlNot affected
Red Hat Enterprise Linux 10postgresql-contribNot affected
Red Hat Enterprise Linux 10postgresql-docsNot affected
Red Hat Enterprise Linux 10postgresql-plperlNot affected
Red Hat Enterprise Linux 10postgresql-plpython3Not affected
Red Hat Enterprise Linux 10postgresql-pltclNot affected
Red Hat Enterprise Linux 10postgresql-private-develNot affected
Red Hat Enterprise Linux 10postgresql-private-libsNot affected
Red Hat Enterprise Linux 10postgresql-serverNot affected
Red Hat Enterprise Linux 10postgresql-server-develNot affected
Red Hat Enterprise Linux 10postgresql-staticNot affected
Red Hat Enterprise Linux 10postgresql-testNot affected
Red Hat Enterprise Linux 10postgresql-test-rpm-macrosNot affected
Red Hat Enterprise Linux 10postgresql-upgradeNot affected
Red Hat Enterprise Linux 10postgresql-upgrade-develNot affected
Red Hat Enterprise Linux 10postgresql16Not affected
Red Hat Enterprise Linux 9pg_repackFixed0:1.4.8-1.module+el9.2.0+17405+aeb9ec60RHSA-2024:5929
Red Hat Enterprise Linux 9pgauditFixed0:16.0-1.module+el9.4.0+20427+07482b8cRHSA-2024:6020
Red Hat Enterprise Linux 9postgres-decoderbufsFixed0:1.9.7-1.Final.module+el9.2.0+17405+aeb9ec60RHSA-2024:5929
Red Hat Enterprise Linux 9postgresqlFixed0:15.8-1.module+el9.4.0+22208+cd6b92ffRHSA-2024:5929
Red Hat Enterprise Linux 9postgresql-contribFixed0:16.4-1.module+el9.4.0+22207+8466e31fRHSA-2024:6020
Red Hat Enterprise Linux 9postgresql-docsFixed0:16.4-1.module+el9.4.0+22207+8466e31fRHSA-2024:6020
Red Hat Enterprise Linux 9postgresql-plperlFixed0:16.4-1.module+el9.4.0+22207+8466e31fRHSA-2024:6020
Red Hat Enterprise Linux 9postgresql-plpython3Fixed0:15.8-1.module+el9.4.0+22208+cd6b92ffRHSA-2024:5929
Red Hat Enterprise Linux 9postgresql-pltclFixed0:15.8-1.module+el9.4.0+22208+cd6b92ffRHSA-2024:5929
Red Hat Enterprise Linux 9postgresql-private-develFixed0:16.4-1.module+el9.4.0+22207+8466e31fRHSA-2024:6020
Red Hat Enterprise Linux 9postgresql-private-libsFixed0:15.8-1.module+el9.4.0+22208+cd6b92ffRHSA-2024:5929
Red Hat Enterprise Linux 9postgresql-serverFixed0:15.8-1.module+el9.4.0+22208+cd6b92ffRHSA-2024:5929
Red Hat Enterprise Linux 9postgresql-server-develFixed0:16.4-1.module+el9.4.0+22207+8466e31fRHSA-2024:6020
Red Hat Enterprise Linux 9postgresql-staticFixed0:16.4-1.module+el9.4.0+22207+8466e31fRHSA-2024:6020
Red Hat Enterprise Linux 9postgresql-testFixed0:16.4-1.module+el9.4.0+22207+8466e31fRHSA-2024:6020
Red Hat Enterprise Linux 9postgresql-test-rpm-macrosFixed0:16.4-1.module+el9.4.0+22207+8466e31fRHSA-2024:6020
Red Hat Enterprise Linux 9postgresql-upgradeFixed0:15.8-1.module+el9.4.0+22208+cd6b92ffRHSA-2024:5929
Red Hat Enterprise Linux 9postgresql-upgrade-develFixed0:16.4-1.module+el9.4.0+22207+8466e31fRHSA-2024:6020
Red Hat Enterprise Linux 8pg_repackFixed0:1.4.8-1.module+el8.10.0+20413+d8116364RHSA-2024:6001
Red Hat Enterprise Linux 8pgauditFixed0:1.7.0-1.module+el8.9.0+19797+c4ce5969RHSA-2024:5927
Red Hat Enterprise Linux 8postgres-decoderbufsFixed0:2.4.0-1.Final.module+el8.10.0+20413+d8116364RHSA-2024:6001
Red Hat Enterprise Linux 8postgresqlFixed0:15.8-1.module+el8.10.0+22212+a51fe170RHSA-2024:5927
Red Hat Enterprise Linux 8postgresql-contribFixed0:15.8-1.module+el8.10.0+22212+a51fe170RHSA-2024:5927
Red Hat Enterprise Linux 8postgresql-docsFixed0:16.4-1.module+el8.10.0+22209+060d7a0aRHSA-2024:6001
Red Hat Enterprise Linux 8postgresql-plperlFixed0:16.4-1.module+el8.10.0+22209+060d7a0aRHSA-2024:6001
Red Hat Enterprise Linux 8postgresql-plpython3Fixed0:15.8-1.module+el8.10.0+22212+a51fe170RHSA-2024:5927
Red Hat Enterprise Linux 8postgresql-pltclFixed0:15.8-1.module+el8.10.0+22212+a51fe170RHSA-2024:5927
Red Hat Enterprise Linux 8postgresql-private-develFixed0:16.4-1.module+el8.10.0+22209+060d7a0aRHSA-2024:6001
Red Hat Enterprise Linux 8postgresql-private-libsFixed0:16.4-1.module+el8.10.0+22209+060d7a0aRHSA-2024:6001
Red Hat Enterprise Linux 8postgresql-serverFixed0:15.8-1.module+el8.10.0+22212+a51fe170RHSA-2024:5927
Red Hat Enterprise Linux 8postgresql-server-develFixed0:16.4-1.module+el8.10.0+22209+060d7a0aRHSA-2024:6001
Red Hat Enterprise Linux 8postgresql-staticFixed0:15.8-1.module+el8.10.0+22212+a51fe170RHSA-2024:5927
Red Hat Enterprise Linux 8postgresql-testFixed0:16.4-1.module+el8.10.0+22209+060d7a0aRHSA-2024:6001
Red Hat Enterprise Linux 8postgresql-test-rpm-macrosFixed0:15.8-1.module+el8.10.0+22212+a51fe170RHSA-2024:5927
Red Hat Enterprise Linux 8postgresql-upgradeFixed0:16.4-1.module+el8.10.0+22209+060d7a0aRHSA-2024:6001
Red Hat Enterprise Linux 8postgresql-upgrade-develFixed0:15.8-1.module+el8.10.0+22212+a51fe170RHSA-2024:5927
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 9pg_repackFixed1.4.8-1.module_el9.3.0+52+21733919ALSA-2024:5929
AlmaLinux 9pgauditFixed1.7.0-1.module_el9.3.0+52+21733919ALSA-2024:5929
AlmaLinux 9postgres-decoderbufsFixed1.9.7-1.Final.module_el9.3.0+52+21733919ALSA-2024:5929
AlmaLinux 9postgresqlFixed15.8-1.module_el9.4.0+111+667b9e9eALSA-2024:5929
AlmaLinux 9postgresql-contribFixed15.8-1.module_el9.4.0+111+667b9e9eALSA-2024:5929
AlmaLinux 9postgresql-docsFixed16.4-1.module_el9.4.0+109+624ac33aALSA-2024:6020
AlmaLinux 9postgresql-plperlFixed15.8-1.module_el9.4.0+111+667b9e9eALSA-2024:5929
AlmaLinux 9postgresql-plpython3Fixed16.4-1.module_el9.4.0+109+624ac33aALSA-2024:6020
AlmaLinux 9postgresql-pltclFixed15.8-1.module_el9.4.0+111+667b9e9eALSA-2024:5929
AlmaLinux 9postgresql-private-develFixed15.8-1.module_el9.4.0+111+667b9e9eALSA-2024:5929
AlmaLinux 9postgresql-private-libsFixed16.4-1.module_el9.4.0+109+624ac33aALSA-2024:6020
AlmaLinux 9postgresql-serverFixed15.8-1.module_el9.4.0+111+667b9e9eALSA-2024:5929
AlmaLinux 9postgresql-server-develFixed15.8-1.module_el9.4.0+111+667b9e9eALSA-2024:5929
AlmaLinux 9postgresql-staticFixed16.4-1.module_el9.4.0+109+624ac33aALSA-2024:6020
AlmaLinux 9postgresql-testFixed15.8-1.module_el9.4.0+111+667b9e9eALSA-2024:5929
AlmaLinux 9postgresql-test-rpm-macrosFixed16.4-1.module_el9.4.0+109+624ac33aALSA-2024:6020
AlmaLinux 9postgresql-upgradeFixed15.8-1.module_el9.4.0+111+667b9e9eALSA-2024:5929
AlmaLinux 9postgresql-upgrade-develFixed16.4-1.module_el9.4.0+109+624ac33aALSA-2024:6020
AlmaLinux 8pg_repackFixed1.4.8-1.module_el8.9.0+3706+885c732eALSA-2024:5927
AlmaLinux 8pgauditFixed16.0-1.module_el8.10.0+3798+606ebb9fALSA-2024:6001
AlmaLinux 8postgres-decoderbufsFixed1.9.7-1.Final.module_el8.9.0+3706+885c732eALSA-2024:5927
AlmaLinux 8postgresqlFixed16.4-1.module_el8.10.0+3884+a79fbae6ALSA-2024:6001
AlmaLinux 8postgresql-contribFixed15.8-1.module_el8.10.0+3888+1aead837ALSA-2024:5927
AlmaLinux 8postgresql-docsFixed16.4-1.module_el8.10.0+3884+a79fbae6ALSA-2024:6001
AlmaLinux 8postgresql-plperlFixed16.4-1.module_el8.10.0+3884+a79fbae6ALSA-2024:6001
AlmaLinux 8postgresql-plpython3Fixed15.8-1.module_el8.10.0+3888+1aead837ALSA-2024:5927
AlmaLinux 8postgresql-pltclFixed16.4-1.module_el8.10.0+3884+a79fbae6ALSA-2024:6001
AlmaLinux 8postgresql-private-develFixed15.8-1.module_el8.10.0+3888+1aead837ALSA-2024:5927
AlmaLinux 8postgresql-private-libsFixed16.4-1.module_el8.10.0+3884+a79fbae6ALSA-2024:6001
AlmaLinux 8postgresql-serverFixed16.4-1.module_el8.10.0+3884+a79fbae6ALSA-2024:6001
AlmaLinux 8postgresql-server-develFixed15.8-1.module_el8.10.0+3888+1aead837ALSA-2024:5927
AlmaLinux 8postgresql-staticFixed16.4-1.module_el8.10.0+3884+a79fbae6ALSA-2024:6001
AlmaLinux 8postgresql-testFixed16.4-1.module_el8.10.0+3884+a79fbae6ALSA-2024:6001
AlmaLinux 8postgresql-test-rpm-macrosFixed15.8-1.module_el8.10.0+3888+1aead837ALSA-2024:5927
AlmaLinux 8postgresql-upgradeFixed16.4-1.module_el8.10.0+3884+a79fbae6ALSA-2024:6001
AlmaLinux 8postgresql-upgrade-develFixed16.4-1.module_el8.10.0+3884+a79fbae6ALSA-2024:6001
Rocky Linux 9pgauditFixed0:16.0-1.module+el9.5.0+30638+72f697e1RLSA-2024:6020
Rocky Linux 9postgres-decoderbufsFixed0:1.9.7-1.Final.module+el9.5.0+30637+4391fccaRLSA-2024:5929
Rocky Linux 8pg_repackFixed0:1.4.8-1.module+el8.9.0+1525+fc91df60RLSA-2024:5927
Rocky Linux 8pgauditFixed0:16.0-1.module+el8.10.0+1622+bd25b19cRLSA-2024:6001
Rocky Linux 8postgres-decoderbufsFixed0:2.4.0-1.Final.module+el8.10.0+1622+bd25b19cRLSA-2024:6001
Rocky Linux 8postgresqlFixed0:15.8-1.module+el8.10.0+1864+f5aa9248RLSA-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.

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.