{"id":"CVE-2024-7348","aliases":["CVE-2024-7348","BIT-POSTGRESQL-2024-7348"],"related":[],"kind":"vulnerability","state":"published","title":"PostgreSQL relation replacement during pg_dump executes arbitrary SQL","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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":"cvelist"},{"lang":"es","text":"La condición de ejecución de tiempo de verificación de tiempo de uso (TOCTOU) en pg_dump en PostgreSQL permite a un creador de objetos ejecutar funciones SQL arbitrarias como el usuario que ejecuta pg_dump, que a menudo es un superusuario. El ataque implica reemplazar otro tipo de relación con una vista o tabla externa. El ataque requiere esperar a que se inicie pg_dump, pero ganar la condición de ejecución es trivial si el atacante retiene una transacción abierta. Las versiones anteriores a PostgreSQL 16.4, 15.8, 14.13, 13.16 y 12.20 se ven afectadas.","source":"nvd"}],"published":"2024-08-08T13:00:02.130Z","modified":"2026-09-10T16:01:45.904Z","severity":{"scorer":"PostgreSQL","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},"severities":[{"scorer":"PostgreSQL","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.5,"rating":"HIGH"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"HIGH"}],"cwes":["CWE-367"],"affected":[{"ranges":[{"type":"rpm","introduced":"16","fixed":"16.4","status":"affected"},{"type":"rpm","introduced":"15","fixed":"15.8","status":"affected"},{"type":"rpm","introduced":"14","fixed":"14.13","status":"affected"},{"type":"rpm","introduced":"13","fixed":"13.16","status":"affected"},{"type":"rpm","introduced":"0","fixed":"12.20","status":"affected"}],"product":"PostgreSQL","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"0","fixed":"12.20","status":"affected"},{"type":"custom","introduced":"13","fixed":"13.16","status":"affected"},{"type":"custom","introduced":"14","fixed":"14.13","status":"affected"},{"type":"custom","introduced":"15","fixed":"15.8","status":"affected"},{"type":"custom","introduced":"16","fixed":"16.4","status":"affected"}],"vendor":"postgresql","product":"postgresql","cpe":"cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"12.0","fixed":"12.20"},{"status":"affected","introduced":"13.0","fixed":"13.16"},{"status":"affected","introduced":"14.0","fixed":"14.13"},{"status":"affected","introduced":"15.0","fixed":"15.8"},{"status":"affected","introduced":"16.0","fixed":"16.4"}],"vendor":"postgresql","product":"postgresql","cpe":"cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"12.20.0"},{"type":"semver","introduced":"13.0.0","status":"affected","fixed":"13.16.0"},{"type":"semver","introduced":"14.0.0","status":"affected","fixed":"14.13.0"},{"type":"semver","introduced":"15.0.0","status":"affected","fixed":"15.8.0"},{"type":"semver","introduced":"16.0.0","status":"affected","fixed":"16.4.0"}],"ecosystem":"Bitnami","package":"postgresql","purl":"pkg:bitnami/postgresql","source":"bitnami"}],"references":[{"url":"https://www.postgresql.org/support/security/CVE-2024-7348/","tags":["advisory","vendor-advisory"],"sources":["cvelist","nvd","bitnami"]},{"url":"http://www.openwall.com/lists/oss-security/2024/08/11/1","tags":["web"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://security.netapp.com/advisory/ntap-20240822-0002/","tags":["web"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-7348","tags":["web"],"sources":["bitnami"]}],"credits":["The PostgreSQL project thanks Noah Misch for reporting this problem."],"assigner":"PostgreSQL","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2024-08-15T00:00:00.000Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-7348","url":"https://www.cve.org/CVERecord?id=CVE-2024-7348","licence":"CVE Terms of Use","modified":"2024-08-22T18:03:18.699Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-7348","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-7348","licence":"Public domain","modified":"2026-06-17T08:19:54.977Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-POSTGRESQL-2024-7348","url":"https://osv.dev/vulnerability/BIT-POSTGRESQL-2024-7348","licence":"Apache-2.0","modified":"2026-09-10T16:01:45.904Z"}],"updatedAt":"2026-11-25T22:58:44.144Z","epss":{"score":0.01565,"percentile":0.76022,"date":"2026-12-01T12:00:22.000Z"}}