CVE-2024-7348

PostgreSQL relation replacement during pg_dump executes arbitrary SQL

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.

Category

8.8
CVSS
Severity: High
CVSS 3.1 •
EPSS 0.21%
Vendor Advisory postgresql.org
Affected: n/a PostgreSQL
Published at:
Updated at:

References

Frequently Asked Questions

What is the severity of CVE-2024-7348?
CVE-2024-7348 has been scored as a high severity vulnerability.
How to fix CVE-2024-7348?
To fix CVE-2024-7348, make sure you are using an up-to-date version of the affected component(s) by checking the vendor release notes. As for now, there are no other specific guidelines available.
Is CVE-2024-7348 being actively exploited in the wild?
As for now, there are no information to confirm that CVE-2024-7348 is being actively exploited. According to its EPSS score, there is a ~0% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2024-7348?
CVE-2024-7348 affects n/a PostgreSQL.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.