CVE-2024-4317: 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...

Medium CVSS 4.3

CVE id
CVE-2024-4317
Published
Last modified

Affected packages

PackageAffected versionsFixed in
PostgreSQL
Runtimes and servers
>= 14.0, < 14.12
>= 15.0, < 15.7
>= 16.0, < 16.3
14.12, 15.7, 16.3

How to fix it

Upgrade PostgreSQL to the fixed release of the line you run: 14.12, 15.7, 16.3.

psql -c 'SELECT version();'
  • Install the patched PostgreSQL minor release of your major version (the postgres image tag, the PGDG packages, or your provider's maintenance update) and restart the server; minor releases need no dump or pg_upgrade.

A free AIssue account reads the runtime versions your repositories pin (version files, Dockerfiles, build files) and tells you when one is affected.

Details

Missing authorization in PostgreSQL built-in views pgstatsext and pgstatsext_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.

References

Am I affected?

Upload or paste your lockfile. We check every package version in it against OSV.dev, this advisory included, and email you the vulnerable ones with the version that fixes them. Free, and no account needed.

or paste its content

Needed when you paste. package.json and pyproject.toml only have version ranges: use the lockfile next to them.

Only package names and versions are checked; the file itself is not kept. We use your email to send this report and nothing else unless you tick the box above. Privacy policy.

About this data

Source: National Vulnerability Database (NVD) (public domain). Severity comes from the advisory's own rating when it has one, else from its CVSS score.