CVE-2024-7348
PostgreSQL relation replacement during pg_dump executes arbitrary SQL
HIGH 8.8
At a glance
- Source
- NVD
- EPSS
- EPSS 1.57 % · percentile 75 ()
- State
- PUBLISHED
- Published
- Updated
- Assigner
- PostgreSQL
- NVD status
- Modified
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.
Weaknesses (CWE)
- CWE-367 — TOCTOU Race Condition
References
Scores
| Version | Score | Vector | Scored by |
|---|---|---|---|
| CVSS 3.1 | HIGH 8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H | PostgreSQL |
| CVSS 3.1 | HIGH 8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H | NVD · f86ef6dc-4d3a-42ad-8f28-e6d5547a5007 (Secondary) |
| CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H | NVD · nvd@nist.gov (Primary) |
European references
- ENISA EUVD · EUVD-2024-48286
- GCVE · GCVE-0-2024-7348
CERT-FR advisories
- CERTFR-2026-AVI-0109 — Multiples vulnérabilités dans les produits IBM · cert.ssi.gouv.fr
- CERTFR-2025-AVI-0580 — Multiples vulnérabilités dans VMware Tanzu · cert.ssi.gouv.fr
- CERTFR-2025-AVI-0524 — Multiples vulnérabilités dans VMware Tanzu · cert.ssi.gouv.fr
- CERTFR-2025-AVI-0401 — Multiples vulnérabilités dans Juniper Networks Secure Analytics · cert.ssi.gouv.fr
- CERTFR-2025-AVI-0106 — Multiples vulnérabilités dans les produits IBM · cert.ssi.gouv.fr
- CERTFR-2025-AVI-0096 — Multiples vulnérabilités dans les produits HPE Aruba Networking · cert.ssi.gouv.fr
- CERTFR-2024-AVI-0992 — Multiples vulnérabilités dans les produits IBM · cert.ssi.gouv.fr
- CERTFR-2024-AVI-0664 — Vulnérabilité dans PostgreSQL · cert.ssi.gouv.fr
Affected configurations (NVD CPE)
cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:*≥ 12.0 < 12.20cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:*≥ 13.0 < 13.16cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:*≥ 14.0 < 14.13cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:*≥ 15.0 < 15.8cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:*≥ 16.0 < 16.4
Affected products
| Product | Versions |
|---|---|
| PostgreSQL | affected 16 < 16.4 ; affected 15 < 15.8 ; affected 14 < 14.13 ; affected 13 < 13.16 ; affected 0 < 12.20 |
Sources
| Source | Licence |
|---|---|
| CVE List (CVEProject cvelistV5) | CVE Program Terms of Use |
| EPSS (FIRST.org) | FIRST — attribution requested |
| ENISA EUVD | ENISA — reproduction authorised, source acknowledged |
| CERT-FR (ANSSI) | Licence Ouverte / Etalab 2.0 |
| NVD (NIST) via fkie-cad/nvd-json-data-feeds | Public domain — this product uses data from the NVD API but is not endorsed or certified by the NVD |