CVE-2024-7348

PostgreSQL relation replacement during pg_dump executes arbitrary SQL

State
Published
Severity
8.8 High
Published
Aug 8, 2024
Updated
Aug 22, 2024
Reserved
Jul 31, 2024

Read the record on cve.org

Description

Time-of-check Time-of-use (TOCTOU) race condition in pg_dump in PostgreSQL allows an object creator to execute arbitrary SQL functions as the user running pg_dump, which is often a superuser. The attack involves replacing another relation type with a view or foreign table. The attack requires waiting for pg_dump to start, but winning the race condition is trivial if the attacker retains an open transaction. Versions before PostgreSQL 16.4, 15.8, 14.13, 13.16, and 12.20 are affected.

Scores

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

Weaknesses

  • CWE-367 Time-of-check Time-of-use (TOCTOU) Race Condition

Affected Products

ProductVersions
PostgreSQLn/a
  • 16 to before 16.4Affected
  • 15 to before 15.8Affected
  • 14 to before 14.13Affected
  • 13 to before 13.16Affected
  • before 12.20Affected

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.