Privileged SQL execution via relation replacement race
Published Aug 8, 2024 · Updated Aug 22, 2024
TOCTOU race in pg_dump in PostgreSQL before 16.4, 15.8, 14.13, 13.16, and 12.20 lets remote authenticated users execute SQL. pg_dump checks a relation and later accesses a same-named replacement view or foreign table, allowing attacker-defined functions to run. The attacker must be able to create database objects and overlap an open transaction with pg_dump; the SQL runs with the dump role's privileges, often superuser.
Summary
What happened
TOCTOU race in pg_dump in PostgreSQL before 16.4, 15.8, 14.13, 13.16, and 12.20 lets remote authenticated users execute SQL. pg_dump checks a relation and later accesses a same-named replacement view or foreign table, allowing attacker-defined functions to run. The attacker must be able to create database objects and overlap an open transaction with pg_dump; the SQL runs with the dump role's privileges, often superuser.
The record
- CVE
- CVE-2024-7348
- Published
- Aug 8, 2024
- Updated
- Aug 22, 2024
- Vendor
- PostgreSQL Global Development Group
- Product
- PostgreSQL
- Classifications
- CWE-367, T1068
- Attack vector
- network
- Privileges
- authenticated
Timeline
How it unfolded
- Aug 8, 2024CVE publishedPublication date reported by the CVE source.
- Aug 22, 2024Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=0 <12.20
- Affected versionversion=13 <13.16
- Affected versionversion=14 <14.13
- Affected versionversion=15 <15.8
- Affected versionversion=16 <16.4
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
No public exploit references are available in this record.
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo