CVE-2026-6475

PostgreSQL pg_basebackup and pg_rewind can overwrite unrelated files of origin superuser choice

State
Published
Severity
8.8 High
Published
May 14, 2026
Updated
May 15, 2026
Reserved
Apr 17, 2026

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
3.18.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:HPostgreSQL

Weaknesses

  • CWE-61 UNIX Symbolic Link (Symlink) Following

Affected Products

ProductVersions
PostgreSQLn/a
  • 18 to before 18.4Affected
  • 17 to before 17.10Affected
  • 16 to before 16.14Affected
  • 15 to before 15.18Affected
  • before 14.23Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.