CVE-2026-16240: PostgreSQL pg_basebackup can use backup manifest content as a format string
Use of externally-controlled format string in PostgreSQL pgbasebackup allows an attacker having already compromised a server to achieve disclosure from pgbasebackup 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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
PostgreSQLto a version that resolves this vulnerability.Fixed in 18.7 - Upgrade
Upgrade
PostgreSQLto a version that resolves this vulnerability.Fixed in 17.12 - Upgrade
Upgrade
PostgreSQLto a version that resolves this vulnerability.Fixed in 16.16 - Upgrade
Upgrade
PostgreSQLto a version that resolves this vulnerability.Fixed in 15.20 - Upgrade
Upgrade
PostgreSQLto a version that resolves this vulnerability.Fixed in 14.25
Event History
Frequently Asked Questions
Who is realistically exposed to this issue?
An attacker must have already compromised a PostgreSQL server and be able to influence backup manifest bytes processed by pg_basebackup. This is not described as an initial server-compromise vector.
What could an attacker obtain through successful exploitation?
The issue can cause disclosure of data from pg_basebackup memory. The improperly read bytes are not sent back to the attacker’s server, so obtaining useful secrets additionally requires implementation-specific means to recover them.
Which PostgreSQL releases need to be updated?
Affected releases are those before PostgreSQL 18.7, 17.12, 16.16, 15.20, and 14.25. Update to the applicable listed release or later.
Is integrity impact expected?
Integrity impact is unlikely. The applicable formatter does not support the %n format specifier.