Track vulnerabilities like this one.
Sign up free to get alerted when software you use is affected.
3.7
CVE-2026-16240: PostgreSQL backup tool can expose memory data
CVE-2026-16240 · published 6 days ago
Summary
The pg_basebackup feature in PostgreSQL versions prior to 14.25, 15.20, 16.16, 17.12, and 18.7 can be tricked into treating data from a backup manifest as a formatting pattern, which may leak bits of the program's memory. If an attacker already has access to the server, they could read this leaked information, though it would not directly change data. Apply the latest PostgreSQL updates or patches for the affected versions to stop the issue.
What to do
- Update debian postgresql-17 to version 17.12-0+deb13u1.
- Update bellsoft postgresql17 to version 17.12-r0.
- Update debian postgresql-15 to version 15.20-0+deb12u1.
- Update debian postgresql-18 to version 18.7-1.
- Update bellsoft postgresql15 to version 15.20-r0.
- Update bellsoft postgresql18 to version 18.7-r0.
- Update postgresql to version 18.7.0.
Affected software
| Ecosystem | Vendor | Product | Affected versions |
|---|---|---|---|
| – | – | postgresql | < 18.7 |
| Debian:12 | debian | postgresql-15 |
< 15.20-0+deb12u1 Fix: upgrade to 15.20-0+deb12u1
|
| Debian:13 | debian | postgresql-17 |
< 17.12-0+deb13u1 Fix: upgrade to 17.12-0+deb13u1
|
| Debian:14 | debian | postgresql-18 |
< 18.7-1 Fix: upgrade to 18.7-1
|
| Ubuntu:Pro:14.04:LTS | canonical | postgresql-9.3 | All versions |
| Ubuntu:Pro:16.04:LTS | canonical | postgresql-9.5 | All versions |
| Ubuntu:Pro:18.04:LTS | canonical | postgresql-10 | All versions |
| Ubuntu:20.04:LTS | canonical | postgresql-12 | All versions |
| Ubuntu:22.04:LTS | canonical | postgresql-14 | All versions |
| Ubuntu:24.04:LTS | canonical | postgresql-16 | All versions |
| Ubuntu:26.10 | canonical | postgresql-18 | All versions |
| Alpaquita:25 | bellsoft | postgresql17 |
>= 17.5-r0, < 17.12-r0 Fix: upgrade to 17.12-r0
|
| Alpaquita:23 | bellsoft | postgresql15 |
>= 15.2-r0, < 15.20-r0 Fix: upgrade to 15.20-r0
|
| Alpaquita:stream | bellsoft | postgresql18 |
>= 18.0-r0, < 18.7-r0 Fix: upgrade to 18.7-r0
|
| Bitnami | – | postgresql |
>= 18.0.0, < 18.7.0 Fix: upgrade to 18.7.0
|
Original advisory text
PostgreSQL pg_basebackup can use backup manifest content as a format string
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.
References
- https://security-tracker.debian.org/tracker/CVE-2026-16240 Vendor Advisory
- https://ubuntu.com/security/CVE-2026-16240 Third Party Advisory
- https://www.cve.org/CVERecord?id=CVE-2026-16240 Third Party Advisory
- https://www.postgresql.org/about/news/postgresql-187-1712-1616-1520-1425-and-19-... Third Party Advisory
- https://docs.bell-sw.com/security/cves/CVE-2026-16240 Vendor Advisory
- https://nvd.nist.gov/vuln/detail/CVE-2026-16240 URL
- https://www.postgresql.org/support/security/CVE-2026-16240/ URL
Internet-facing
60 days
Internal
At next upgrade
- Not known to be exploited
- Needs hands-on effort to exploit
- Gives an attacker partial control
Type
CWE-134Use of Externally-Controlled Format String
Timeline
Published27 Nov 2026
Updated2 Dec 2026
First seen12 Nov 2026
Sources
CVE-2026-16240 · NVD
CVE-2026-16240 · MITRE
DEBIAN-CVE-2026-16240 · OSV
UBUNTU-CVE-2026-16240 · OSV
BELL-CVE-2026-16240 · OSV
Track software like this
Free during beta