CVE-2026-120152 PostgreSQL pg_show_all_settings() use-after-free discloses memory
A database user can trigger a use-after-free in pg_show_all_settings() to read memory contents; PostgreSQL administrators should care.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Harmful if only installed
- No
- Needs a specific call
- No
- Fix
- Available
What is CVE-2026-120152?
CVE-2026-120152 is a medium-severity use after free vulnerability in PostgreSQL, published on 12 Nov 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
Use after free in PostgreSQL pg_show_all_settings() allows a database user to retrieve memory contents, via loading a module while the function is scanning custom-variable placeholders that the module replaces and frees. Within major versions 16-18, minor versions before PostgreSQL 18.7, 17.12, and 16.16 are affected. Versions before PostgreSQL 16 are unaffected.
Weakness: CWE-416
Which versions are affected by CVE-2026-120152?
An affected version is exposed as installed. No special setting or call is needed.
How do I fix CVE-2026-120152?
Upgrade to a fixed version.
Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.
Is CVE-2026-120152 being exploited?
There is no known exploitation of CVE-2026-120152 in the wild and no public exploit code.
Sources
Also known as ALPINE-CVE-2026-120152, DEBIAN-CVE-2026-120152, ECHO-fa64-d304-9205, GHSA-3jp2-46gg-vhpr.