---
id: "CVE-2026-120152"
page: "https://infrastack.ai/live/CVE-2026-120152"
kind: "vulnerability"
aliases: ["CVE-2026-120152"]
title: "PostgreSQL: a database user can read memory via settings function"
severity: "medium"
cvss: 4.3
epss: null
exploited: false
status: "open"
category: "runtime"
products: []
ecosystems: []
tags: ["database", "postgresql", "runtime"]
not_affected_if: ["fully-patched-minor-version", "postgresql-before-16", "trusted-users-only"]
published_at: "2026-11-12T15:17:43+00:00"
first_seen_at: "2026-11-12T15:41:56+00:00"
updated_at: "2026-11-12T15:43:58+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-120152", "first_seen_at": "2026-11-12T15:41:56+00:00"}]
exploit_sources: []
---

# PostgreSQL: a database user can read memory via settings function

Link for people: https://infrastack.ai/live/CVE-2026-120152 (this .md is for agents)

A use-after-free bug in PostgreSQL's pg_show_all_settings() function can be triggered while a module is loaded, letting a database user retrieve memory contents. The flaw affects PostgreSQL 16 through 18 before the fixed minor releases.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Run `SELECT version();` in psql and compare the minor version against the fixed releases.
- Check whether the server is PostgreSQL 16, 17 or 18 (versions before 16 are unaffected).

## Fix

- PostgreSQL `18.7`, `17.12` and `16.16` (the fixed minor versions, per the sources).

## Timeline

- 2026-11-12T15:41:56+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-120152

## From the sources

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.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
