BreachSpiderVerified, not vibes

CVE-2024-7348 in Postgresql

High 7.5

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 ...

Affects 1 product from 1 vendor. Facts below cite their sources.

CVSS 3.17.5
EPSS1.3%
EPSS percentile71th
FixSee advisory

Remotely exploitable over the network, high complexity, low privileges required, no user interaction needed, impact contained to the vulnerable component, full confidentiality impact, full integrity impact, full availability impact.

Affected products and versions

VendorProductAffected versions
Postgresql Postgresql < 12.20
Abb S Engineering 2.2 2.3 2.4

A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.

Fix and vendor advisory

View Vendor Advisory →

Vendor PSIRT: f86ef6dc-4d3a-42ad-8f28-e6d5547a5007

Exploitation

CISA known-exploitedNot in the CISA KEV catalog
Public exploitNot confirmed

Official 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.

Source: NIST NVD / MITRE CVE.

Record details

CVE IDCVE-2024-7348
BreachSpider IDBS-2024-GLOBAL-047709-H
CVSS vectorCVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
Published2024-08-08
Last modified2026-06-17
Weakness (CWE)
SourceNVD

Weakness definitions

CWE-367: CWE-367

Related attack patterns (CAPEC)

CAPEC-27 Leveraging Race Conditions via Symbolic Links via CWE-367

CAPEC-29 Leveraging Time-of-Check and Time-of-Use (TOCTOU) Race Conditions via CWE-367

Mapping is CWE to CAPEC per MITRE CAPEC 3.9.

Analysis AI-written, not human-reviewed

A 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, typically a superuser, by replacing another relation type with a view or foreign table.

The attack involves an attacker waiting for pg_dump to start and then replacing a relation type with a view or foreign table before pg_dump processes it, allowing the execution of arbitrary SQL functions.

Questions

What is CVE-2024-7348?

A 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, typically a superuser, by replacing another relation type with a view or foreign table.

What is the CVSS score for CVE-2024-7348?

CVE-2024-7348 has CVSS 7.5 (High). Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H. EPSS: 1.3%.

Is CVE-2024-7348 actively exploited?

No confirmed active exploitation of CVE-2024-7348 as of 2026-09-25.

How do I remediate CVE-2024-7348?

Priority: HIGH. Advisory: https://www.postgresql.org/support/security/CVE-2024-7348/ PSIRT: f86ef6dc-4d3a-42ad-8f28-e6d5547a5007

What systems are affected by CVE-2024-7348?

CVE-2024-7348 affects Postgresql Postgresql.

For developers and AI agents

Run this check from your own code or agent

REST API

curl -s https://breachspider.com/api/v1/assets/correlate-cves \
 -H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
 -H "Content-Type: application/json" \
 -d '{"assets":[{"asset_id":"dev-1","vendor":"Postgresql","product":"Postgresql","version":"1.0"}]}'

API reference

Python SDK

pip install breachspider

PyPI · GitHub

MCP for AI agents

# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp

Setup for Claude, ChatGPT, Cursor

Free trial: 14 days, 750 device checks, no card.

Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-06-17.