---
id: "CVE-2026-16240"
page: "https://infrastack.ai/live/CVE-2026-16240"
kind: "vulnerability"
aliases: ["CVE-2026-16240"]
title: "PostgreSQL: pg_basebackup format string flaw can leak client memory"
severity: "low"
cvss: 3.7
epss: null
exploited: false
status: "open"
category: "vendor"
products: []
ecosystems: []
tags: ["database-backups", "pg_basebackup", "postgresql", "vendor"]
not_affected_if: ["not-using-pg_basebackup", "trusted-source-servers-only"]
published_at: "2026-11-12T15:17:50+00:00"
first_seen_at: "2026-11-12T15:41:57+00:00"
updated_at: "2026-11-12T15:44:06+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-16240", "first_seen_at": "2026-11-12T15:41:57+00:00"}]
exploit_sources: []
---

# PostgreSQL: pg_basebackup format string flaw can leak client memory

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

A flaw in PostgreSQL's pg_basebackup tool lets a server that has already been compromised read bytes from pg_basebackup's memory through crafted backup manifest data. The leaked bytes are not sent back to the attacker, so an exploit would need additional implementation-specific knowledge to recover useful secrets.

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

## How to check

- Check the installed version with `pg_basebackup --version`
- Versions before `18.7`, `17.12`, `16.16`, `15.20` and `14.25` are affected

## Fix

- Upgrade PostgreSQL to `18.7`, `17.12`, `16.16`, `15.20` or `14.25` for the matching major version

## Timeline

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

## From the sources

Use of externally-controlled format string in PostgreSQL pg_basebackup allows an attacker having already compromised a server to achieve disclosure from pg_basebackup memory, via backup manifest bytes.  The vulnerability does not return the improperly-read bytes back to the attacker's server, so a successful attack would need separate implementation-specific secrets for that.  Integrity impact is unlikely; in particular, the applicable formatter does not support %n.  Versions before PostgreSQL 18.7, 17.12, 16.16, 15.20, and 14.25 are affected.

---

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