CVE-2026-6475 PostgreSQL pg_basebackup and pg_rewind can overwrite unrelated files of origin superuser choice

High 8.8 Published Updated

An origin superuser can overwrite local files via symlink following in pg_basebackup or pg_rewind, potentially hijacking the OS account.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-6475?

CVE-2026-6475 is a high-severity path traversal vulnerability in Postgresql Postgresql, published on 14 May 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

Symlink following in PostgreSQL pg_basebackup plain format and in pg_rewind allows an origin superuser to overwrite local files, e.g. /var/lib/postgres/.bashrc, that hijack the operating system account. It will remain the case that starting the server after these commands implicitly trusts the origin superuser, due to features like shared_preload_libraries. Hence, the attack has practical implications only if one takes relevant action between these commands and server start, like moving the files to a different VM or snapshotting the VM. Versions before PostgreSQL 18.4, 17.10, 16.14, 15.18, and 14.23 are affected.

Weakness: CWE-61

Which versions are affected by CVE-2026-6475?

1 open source package ship an affected version, including postgresql. It affects 1 product.

PackageAffectedFixed in
postgresql BitnamiAll versions14.23.0, 15.18.0, 16.14.0, 17.10.0, 18.4.0

Products include Postgresql Postgresql.

How do I fix CVE-2026-6475?

Upgrade postgresql to a fixed version for your release line: 14.23.0, 15.18.0, 16.14.0 or 17.10.0.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2026-6475 being exploited?

There is no known exploitation of CVE-2026-6475 in the wild and no public exploit code.

Public exploit code: 1 proofs of concept on GitHub.

All Postgresql Postgresql vulnerabilities

Sources

Also known as ALPINE-CVE-2026-6475, AZL-86828, BELL-CVE-2026-6475, BIT-postgresql-2026-6475, CLSA-2026-1788193166, DEBIAN-CVE-2026-6475 and 10 more.

Is CVE-2026-6475 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free