{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2024-7348","id":"CVE-2024-7348","title":"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 tr","descriptionLong":"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.","published":"2024-08-08T13:00:02.130Z","updated":"2026-06-17T08:19:54.977Z","reserved":"2024-07-31T18:33:23.341Z","status":"Modified","rejected":false,"assigner":"PostgreSQL","metric":{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"PostgreSQL"},"metrics":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"PostgreSQL"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"f86ef6dc-4d3a-42ad-8f28-e6d5547a5007"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"NVD"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"OSV"}],"rating":"high","products":["PostgreSQL"],"affectedProducts":[{"vendor":"n/a","product":"PostgreSQL","defaultStatus":"unaffected","versions":[{"lessThan":"16.4","status":"affected","version":"16","versionType":"rpm"},{"lessThan":"15.8","status":"affected","version":"15","versionType":"rpm"},{"lessThan":"14.13","status":"affected","version":"14","versionType":"rpm"},{"lessThan":"13.16","status":"affected","version":"13","versionType":"rpm"},{"lessThan":"12.20","status":"affected","version":"0","versionType":"rpm"}],"platforms":[]}],"packages":[],"cwes":["CWE-367"],"aliases":["BIT-postgresql-2024-7348"],"references":[{"url":"https://www.postgresql.org/support/security/CVE-2024-7348/","tags":["Vendor Advisory","advisory"]},{"url":"http://www.openwall.com/lists/oss-security/2024/08/11/1","tags":["web"]},{"url":"https://security.netapp.com/advisory/ntap-20240822-0002/","tags":["advisory"]}],"patchReferenced":false,"fixAvailable":false,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total"},"epss":0.01565,"epssPercentile":0.7579,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2024-7348","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-7348","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2024-7348","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2024-7348","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":["postgresql"],"critical":[],"attention":null}