CVE-2024-7348
published high CVSS 3.1 · 8.8PostgreSQL relation replacement during pg_dump executes arbitrary SQL
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| n/a | — | PostgreSQL16 to < 16.4 · 15 to < 15.8 · 14 to < 14.13 · 13 to < 13.16 · 0 to < 12.20 · Other versions: unaffected | Affected | Not stated | PostgreSQL |
| postgresql | — | postgresql0 to < 12.20 · 13 to < 13.16 · 14 to < 14.13 · 15 to < 15.8 · 16 to < 16.4 · Other versions: unknown | Affected | Not stated | CISA-ADP |
| Amazon Linux | AL2 | Release evaluationALAS2-2025-2733 | Fixed | Not stated | Amazon Linux assessment |
| Amazon Linux | AL2 | Release evaluationALAS2POSTGRESQL12-2024-011 | Fixed | Not stated | Amazon Linux assessment |
| Amazon Linux | AL2 | Release evaluationALAS2POSTGRESQL12-2024-012 | Fixed | Not stated | Amazon Linux assessment |
| Amazon Linux | AL2 | Release evaluationALAS2POSTGRESQL13-2024-007 | Fixed | Not stated | Amazon Linux assessment |
| AlmaLinux | 8 | postgresql | Advisory build | 12.20-1.module_el8.10.0+3886+1dfe41d7 | ALSA-2024:6000 |
| Oracle Linux | 7 | postgresqlaarch64 | Advisory build | 0:9.2.24-9.0.1.el7_9 | ELSA-2024-8495 |
Show 101 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Amazon Linux | AL2 | Release evaluationALAS2POSTGRESQL14-2024-012 | Fixed | Not stated | Amazon Linux assessment |
| Amazon Linux | AL2 | Release evaluationALAS2POSTGRESQL14-2024-013 | Fixed | Not stated | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluationALAS2023-2024-702 | Fixed | Not stated | Amazon Linux assessment |
| Red Hat Enterprise Linux | RHEL-7 | postgresqli686 | Advisory build | 9.2.24-9.el7_9.1 | RHSA-2024:8495 |
| AlmaLinux | 8 | postgresql | Advisory build | 13.16-1.module_el8.10.0+3887+93e5d125 | ALSA-2024:6018 |
| AlmaLinux | 8 | postgresql | Advisory build | 15.8-1.module_el8.10.0+3888+1aead837 | ALSA-2024:6001 |
| AlmaLinux | 8 | postgresql | Advisory build | 16.4-1.module_el8.10.0+3884+a79fbae6 | ALSA-2024:5927 |
| AlmaLinux | 9 | postgresql | Advisory build | 13.16-1.el9_4 | ALSA-2024:5999 |
| AlmaLinux | 9 | postgresql | Advisory build | 15.8-1.module_el9.4.0+111+667b9e9e | ALSA-2024:6020 |
| AlmaLinux | 9 | postgresql | Advisory build | 16.4-1.module_el9.4.0+109+624ac33a | ALSA-2024:5929 |
| Oracle Linux | 7 | postgresqlx86_64 | Advisory build | 0:9.2.24-9.0.1.el7_9 | ELSA-2024-8495 |
| Oracle Linux | 8 | postgresqlaarch64 · postgresql · 12b | Advisory build | 0:12.20-1.module+el8.10.0+90397+67dad74f | ELSA-2024-6000 |
| Oracle Linux | 8 | postgresqlaarch64 · postgresql · 13b | Advisory build | 0:13.16-1.module+el8.10.0+90398+791f18a8 | ELSA-2024-6018 |
| Oracle Linux | 8 | postgresqlaarch64 · postgresql · 15b | Advisory build | 0:15.8-1.module+el8.10.0+90396+38e9dad0 | ELSA-2024-6001 |
| Oracle Linux | 8 | postgresqlaarch64 · postgresql · 16b | Advisory build | 0:16.4-1.module+el8.10.0+90393+cf801dc8 | ELSA-2024-5927 |
| Oracle Linux | 8 | postgresqlx86_64 · postgresql · 12b | Advisory build | 0:12.20-1.module+el8.10.0+90397+67dad74f | ELSA-2024-6000 |
| Oracle Linux | 8 | postgresqlx86_64 · postgresql · 13b | Advisory build | 0:13.16-1.module+el8.10.0+90398+791f18a8 | ELSA-2024-6018 |
| Oracle Linux | 8 | postgresqlx86_64 · postgresql · 15b | Advisory build | 0:15.8-1.module+el8.10.0+90396+38e9dad0 | ELSA-2024-6001 |
| Oracle Linux | 8 | postgresqlx86_64 · postgresql · 16b | Advisory build | 0:16.4-1.module+el8.10.0+90393+cf801dc8 | ELSA-2024-5927 |
| Oracle Linux | 9 | postgresqlaarch64 | Advisory build | 0:13.16-1.0.1.el9_4 | ELSA-2024-5999 |
| Oracle Linux | 9 | postgresqlaarch64 · postgresql · 15b | Advisory build | 0:15.8-1.module+el9.4.0+90399+63b2ad7b | ELSA-2024-6020 |
| Oracle Linux | 9 | postgresqlaarch64 · postgresql · 16b | Advisory build | 0:16.4-1.module+el9.4.0+90394+9e4f3cba | ELSA-2024-5929 |
| Oracle Linux | 9 | postgresqlx86_64 | Advisory build | 0:13.16-1.0.1.el9_4 | ELSA-2024-5999 |
| Oracle Linux | 9 | postgresqlx86_64 · postgresql · 15b | Advisory build | 0:15.8-1.module+el9.4.0+90399+63b2ad7b | ELSA-2024-6020 |
| Oracle Linux | 9 | postgresqlx86_64 · postgresql · 16b | Advisory build | 0:16.4-1.module+el9.4.0+90394+9e4f3cba | ELSA-2024-5929 |
| Red Hat Enterprise Linux | RHEL-7 | postgresqlppc | Advisory build | 9.2.24-9.el7_9.1 | RHSA-2024:8495 |
| Red Hat Enterprise Linux | RHEL-7 | postgresqlppc64 | Advisory build | 9.2.24-9.el7_9.1 | RHSA-2024:8495 |
| Red Hat Enterprise Linux | RHEL-7 | postgresqlppc64le | Advisory build | 9.2.24-9.el7_9.1 | RHSA-2024:8495 |
| Red Hat Enterprise Linux | RHEL-7 | postgresqls390 | Advisory build | 9.2.24-9.el7_9.1 | RHSA-2024:8495 |
| Red Hat Enterprise Linux | RHEL-7 | postgresqls390x | Advisory build | 9.2.24-9.el7_9.1 | RHSA-2024:8495 |
| Red Hat Enterprise Linux | RHEL-7 | postgresqlsrc | Advisory build | 9.2.24-9.el7_9.1 | RHSA-2024:8495 |
| Red Hat Enterprise Linux | RHEL-7 | postgresqlx86_64 | Advisory build | 9.2.24-9.el7_9.1 | RHSA-2024:8495 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlaarch64 | Advisory build | 12.20-1.module+el8.10.0+22214+9beb89d6 | RHSA-2024:6000 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlaarch64 | Advisory build | 12.20-1.module+el8.6.0+22262+7cfee20c | RHSA-2024:6559 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlaarch64 | Advisory build | 12.20-1.module+el8.8.0+22245+25697bde | RHSA-2024:6137 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlaarch64 | Advisory build | 13.16-1.module+el8.10.0+22213+5adc94fe | RHSA-2024:6018 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlaarch64 | Advisory build | 13.16-1.module+el8.6.0+22263+b155edfd | RHSA-2024:6558 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlaarch64 | Advisory build | 13.16-1.module+el8.8.0+22253+503e51b2.2 | RHSA-2024:6141 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlaarch64 | Advisory build | 15.8-1.module+el8.10.0+22212+a51fe170 | RHSA-2024:6001 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlaarch64 | Advisory build | 15.8-1.module+el8.8.0+22236+c63904f0 | RHSA-2024:6142 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlaarch64 | Advisory build | 16.4-1.module+el8.10.0+22209+060d7a0a | RHSA-2024:5927 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlppc64le | Advisory build | 12.20-1.module+el8.10.0+22214+9beb89d6 | RHSA-2024:6000 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlppc64le | Advisory build | 12.20-1.module+el8.4.0+22243+33bf1bc8 | RHSA-2024:6139 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlppc64le | Advisory build | 12.20-1.module+el8.6.0+22262+7cfee20c | RHSA-2024:6559 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlppc64le | Advisory build | 12.20-1.module+el8.8.0+22245+25697bde | RHSA-2024:6137 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlppc64le | Advisory build | 13.16-1.module+el8.10.0+22213+5adc94fe | RHSA-2024:6018 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlppc64le | Advisory build | 13.16-1.module+el8.4.0+22254+6164d1ea | RHSA-2024:6557 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlppc64le | Advisory build | 13.16-1.module+el8.6.0+22263+b155edfd | RHSA-2024:6558 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlppc64le | Advisory build | 13.16-1.module+el8.8.0+22253+503e51b2.2 | RHSA-2024:6141 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlppc64le | Advisory build | 15.8-1.module+el8.10.0+22212+a51fe170 | RHSA-2024:6001 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlppc64le | Advisory build | 15.8-1.module+el8.8.0+22236+c63904f0 | RHSA-2024:6142 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlppc64le | Advisory build | 16.4-1.module+el8.10.0+22209+060d7a0a | RHSA-2024:5927 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqls390x | Advisory build | 12.20-1.module+el8.10.0+22214+9beb89d6 | RHSA-2024:6000 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqls390x | Advisory build | 12.20-1.module+el8.6.0+22262+7cfee20c | RHSA-2024:6559 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqls390x | Advisory build | 12.20-1.module+el8.8.0+22245+25697bde | RHSA-2024:6137 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqls390x | Advisory build | 13.16-1.module+el8.10.0+22213+5adc94fe | RHSA-2024:6018 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqls390x | Advisory build | 13.16-1.module+el8.6.0+22263+b155edfd | RHSA-2024:6558 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqls390x | Advisory build | 13.16-1.module+el8.8.0+22253+503e51b2.2 | RHSA-2024:6141 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqls390x | Advisory build | 15.8-1.module+el8.10.0+22212+a51fe170 | RHSA-2024:6001 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqls390x | Advisory build | 15.8-1.module+el8.8.0+22236+c63904f0 | RHSA-2024:6142 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqls390x | Advisory build | 16.4-1.module+el8.10.0+22209+060d7a0a | RHSA-2024:5927 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlsrc | Advisory build | 12.20-1.module+el8.10.0+22214+9beb89d6 | RHSA-2024:6000 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlsrc | Advisory build | 12.20-1.module+el8.2.0+22244+976eca25 | RHSA-2024:6138 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlsrc | Advisory build | 12.20-1.module+el8.4.0+22243+33bf1bc8 | RHSA-2024:6139 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlsrc | Advisory build | 12.20-1.module+el8.6.0+22262+7cfee20c | RHSA-2024:6559 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlsrc | Advisory build | 12.20-1.module+el8.8.0+22245+25697bde | RHSA-2024:6137 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlsrc | Advisory build | 13.16-1.module+el8.10.0+22213+5adc94fe | RHSA-2024:6018 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlsrc | Advisory build | 13.16-1.module+el8.4.0+22254+6164d1ea | RHSA-2024:6557 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlsrc | Advisory build | 13.16-1.module+el8.6.0+22263+b155edfd | RHSA-2024:6558 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlsrc | Advisory build | 13.16-1.module+el8.8.0+22253+503e51b2.2 | RHSA-2024:6141 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlsrc | Advisory build | 15.8-1.module+el8.10.0+22212+a51fe170 | RHSA-2024:6001 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlsrc | Advisory build | 15.8-1.module+el8.8.0+22236+c63904f0 | RHSA-2024:6142 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlsrc | Advisory build | 16.4-1.module+el8.10.0+22209+060d7a0a | RHSA-2024:5927 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlx86_64 | Advisory build | 12.20-1.module+el8.10.0+22214+9beb89d6 | RHSA-2024:6000 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlx86_64 | Advisory build | 12.20-1.module+el8.2.0+22244+976eca25 | RHSA-2024:6138 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlx86_64 | Advisory build | 12.20-1.module+el8.4.0+22243+33bf1bc8 | RHSA-2024:6139 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlx86_64 | Advisory build | 12.20-1.module+el8.6.0+22262+7cfee20c | RHSA-2024:6559 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlx86_64 | Advisory build | 12.20-1.module+el8.8.0+22245+25697bde | RHSA-2024:6137 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlx86_64 | Advisory build | 13.16-1.module+el8.10.0+22213+5adc94fe | RHSA-2024:6018 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlx86_64 | Advisory build | 13.16-1.module+el8.4.0+22254+6164d1ea | RHSA-2024:6557 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlx86_64 | Advisory build | 13.16-1.module+el8.6.0+22263+b155edfd | RHSA-2024:6558 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlx86_64 | Advisory build | 13.16-1.module+el8.8.0+22253+503e51b2.2 | RHSA-2024:6141 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlx86_64 | Advisory build | 15.8-1.module+el8.10.0+22212+a51fe170 | RHSA-2024:6001 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlx86_64 | Advisory build | 15.8-1.module+el8.8.0+22236+c63904f0 | RHSA-2024:6142 |
| Red Hat Enterprise Linux | RHEL-8 | postgresqlx86_64 | Advisory build | 16.4-1.module+el8.10.0+22209+060d7a0a | RHSA-2024:5927 |
| Red Hat Enterprise Linux | RHEL-9 | postgresqlaarch64 | Advisory build | 13.16-1.el9_0 | RHSA-2024:6144 |
| Red Hat Enterprise Linux | RHEL-9 | postgresqlaarch64 | Advisory build | 13.16-1.el9_2 | RHSA-2024:6145 |
| Red Hat Enterprise Linux | RHEL-9 | postgresqlaarch64 | Advisory build | 13.16-1.el9_4 | RHSA-2024:5999 |
| Red Hat Enterprise Linux | RHEL-9 | postgresqlaarch64 | Advisory build | 15.8-1.module+el9.2.0+22239+65063c2d.1 | RHSA-2024:6140 |
| Red Hat Enterprise Linux | RHEL-9 | postgresqlaarch64 | Advisory build | 15.8-1.module+el9.4.0+22208+cd6b92ff | RHSA-2024:6020 |
| Red Hat Enterprise Linux | RHEL-9 | postgresqlaarch64 | Advisory build | 16.4-1.module+el9.4.0+22207+8466e31f | RHSA-2024:5929 |
| Red Hat Enterprise Linux | RHEL-9 | postgresqlppc64le | Advisory build | 13.16-1.el9_0 | RHSA-2024:6144 |
| Red Hat Enterprise Linux | RHEL-9 | postgresqlppc64le | Advisory build | 13.16-1.el9_2 | RHSA-2024:6145 |
| Red Hat Enterprise Linux | RHEL-9 | postgresqlppc64le | Advisory build | 13.16-1.el9_4 | RHSA-2024:5999 |
| Red Hat Enterprise Linux | RHEL-9 | postgresqlppc64le | Advisory build | 15.8-1.module+el9.2.0+22239+65063c2d.1 | RHSA-2024:6140 |
| Red Hat Enterprise Linux | RHEL-9 | postgresqlppc64le | Advisory build | 15.8-1.module+el9.4.0+22208+cd6b92ff | RHSA-2024:6020 |
| Red Hat Enterprise Linux | RHEL-9 | postgresqlppc64le | Advisory build | 16.4-1.module+el9.4.0+22207+8466e31f | RHSA-2024:5929 |
| Red Hat Enterprise Linux | RHEL-9 | postgresqls390x | Advisory build | 13.16-1.el9_0 | RHSA-2024:6144 |
| Red Hat Enterprise Linux | RHEL-9 | postgresqls390x | Advisory build | 13.16-1.el9_2 | RHSA-2024:6145 |
| Red Hat Enterprise Linux | RHEL-9 | postgresqls390x | Advisory build | 13.16-1.el9_4 | RHSA-2024:5999 |
| Red Hat Enterprise Linux | RHEL-9 | postgresqls390x | Advisory build | 15.8-1.module+el9.2.0+22239+65063c2d.1 | RHSA-2024:6140 |
Package entries are limited to the first 100 builds and 100 linked advisories.
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Showing the first 100 linked advisory records.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 8.8 / 10
- Severity
- high
- Provider
- PostgreSQL · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| n/a | PostgreSQL | 16 to < 16.4 (affected · rpm)15 to < 15.8 (affected · rpm)14 to < 14.13 (affected · rpm)13 to < 13.16 (affected · rpm)0 to < 12.20 (affected · rpm)Default: unaffected | PostgreSQL · cna |
| postgresql | postgresql | 0 to < 12.20 (affected · custom)13 to < 13.16 (affected · custom)14 to < 14.13 (affected · custom)15 to < 15.8 (affected · custom)16 to < 16.4 (affected · custom)Default: unknown | CISA-ADP · adp |
Weaknesses
1- CWE-367 Time-of-check Time-of-use (TOCTOU) Race Condition
References
3Provider assertions
3PostgreSQL · cna
PostgreSQL relation replacement during pg_dump executes arbitrary SQL
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- dfa7c97abcb426387f3b20bfa728668ad749552f4178aeca7dcdfe13f19089b8
- Ingested
- 23 Sep 2026, 08:33:35 UTC
- Source record
- Official CVE record