Skip to content
CVE Tracker
  • Newest CVEsPage
  • Recently added to KEVPage
  • Rising exploitation (EPSS)Page
  • Weekly digestPage
  • StatisticsPage
  • WatchlistPage
  • API documentationPage
  • MCP serverPage
  • Data sourcesPage
  • ChangelogPage
  • AboutPage
  • How it's builtPage
Back

CVE-2024-7348

PostgreSQL relation replacement during pg_dump executes arbitrary SQL

High8.8EPSS 1.6%
Published
Updated
Reserved
Assigned by
PostgreSQL

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

CVSS scores of CVE-2024-7348, by who scored it
Scored byCVSSScoreVector
PostgreSQLCNA (assigner)3.1High8.8CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
NVDNVD · Modified3.1High7.5CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS (exploitation in 30 days)
1.6% · top 25% of all CVEs (6 Nov 2026)
CISA SSVC
Exploitation: none · Automatable: no · Technical impact: total
Loading the EPSS history…

The list uses the assigner's score when there is one, then CISA's, then NVD's: High 8.8.

Weakness

Affected products

  • PostgreSQL

    • affected 16 – < 16.4
    • affected 15 – < 15.8
    • affected 14 – < 14.13
    • affected 13 – < 13.16
    • affected < 12.20

References (3)

Sources

The same CVE in the primary databases and aggregators, to check against.

Badge for a README or a ticket

CVE-2024-7348 badge
[![CVE-2024-7348](https://trackcve.app/badge/CVE-2024-7348.svg)](https://trackcve.app/cve/CVE-2024-7348)

Record last updated .