cve.bz

CVE-2024-7348 postgresql postgresql

7.5 highEPSS 1.6%

High (7.5) in postgresql postgresql. EPSS 1.6% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 3.1

7.5 high
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS
1.6% (unchanged from 1.6% a week ago; 1.6% 30 days ago) estimated probability of exploitation activity in the next 30 days; 76th percentile. Scored 2026-11-24. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2024-08-15. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-367 Time-of-check Time-of-use (TOCTOU) Race Condition
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2024-7348 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2024-7348?via=ask-ai-copy and https://cve.bz/cve/CVE-2024-7348?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2024-7348 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
postgresql:postgresqlfrom 12.0 before 12.20
postgresql:postgresqlfrom 13.0 before 13.16
postgresql:postgresqlfrom 14.0 before 14.13
postgresql:postgresqlfrom 15.0 before 15.8
postgresql:postgresqlfrom 16.0 before 16.4

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian11postgresql-1313.16-0+deb11u1DSA-5746-1
Debian12postgresql-1515.8-0+deb12u1DEBIAN-CVE-2024-7348 DSA-5745-1
Ubuntu20.04:LTSpostgresql-1212.20-0ubuntu0.20.04.1UBUNTU-CVE-2024-7348 USN-6968-1
Ubuntu22.04:LTSpostgresql-1414.13-0ubuntu0.22.04.1UBUNTU-CVE-2024-7348 USN-6968-1
Ubuntu24.04:LTSpostgresql-1616.4-0ubuntu0.24.04.1UBUNTU-CVE-2024-7348 USN-6968-1
UbuntuPro:14.04:LTSpostgresql-9.39.3.24-0ubuntu0.14.04+esm1UBUNTU-CVE-2024-7348 USN-6968-3
UbuntuPro:16.04:LTSpostgresql-9.59.5.25-0ubuntu0.16.04.1+esm8UBUNTU-CVE-2024-7348 USN-6968-2
UbuntuPro:18.04:LTSpostgresql-1010.23-0ubuntu0.18.04.2+esm2UBUNTU-CVE-2024-7348 USN-6968-3
Red Hatenterprise_linux:8::appstreampg_repack, pg_repack-debuginfo, pg_repack-debugsource0:1.4.6-3.module+el8.9.0+19330+c97ddbdfRHSA-2024:6000
Red Hatenterprise_linux:8::appstreampg_repack, pg_repack-debuginfo, pg_repack-debugsource0:1.4.6-3.module+el8.9.0+20664+9c30cf7fRHSA-2024:6018
Red Hatenterprise_linux:8::appstreampg_repack, pg_repack-debuginfo, pg_repack-debugsource0:1.4.8-1.module+el8.10.0+20413+d8116364RHSA-2024:5927
Red Hatenterprise_linux:8::appstreampg_repack, pg_repack-debuginfo, pg_repack-debugsource0:1.4.8-1.module+el8.9.0+19797+c4ce5969RHSA-2024:6001
Red Hatenterprise_linux:8::appstreampgaudit, pgaudit-debuginfo, pgaudit-debugsource0:1.4.0-7.module+el8.10.0+22214+9beb89d6RHSA-2024:6000
Red Hatenterprise_linux:8::appstreampgaudit, pgaudit-debuginfo, pgaudit-debugsource0:1.5.0-1.module+el8.9.0+20664+9c30cf7fRHSA-2024:6018
Red Hatenterprise_linux:8::appstreampgaudit, pgaudit-debuginfo, pgaudit-debugsource0:1.7.0-1.module+el8.9.0+19797+c4ce5969RHSA-2024:6001
Red Hatenterprise_linux:8::appstreampgaudit, pgaudit-debuginfo, pgaudit-debugsource0:16.0-1.module+el8.10.0+20413+d8116364RHSA-2024:5927
Red Hatenterprise_linux:8::appstreampostgres-decoderbufs, postgres-decoderbufs-debuginfo, postgres-decoderbufs-debugsource0:0.10.0-2.module+el8.9.0+19330+c97ddbdfRHSA-2024:6000
Red Hatenterprise_linux:8::appstreampostgres-decoderbufs, postgres-decoderbufs-debuginfo, postgres-decoderbufs-debugsource0:0.10.0-2.module+el8.9.0+20664+9c30cf7fRHSA-2024:6018
Red Hatenterprise_linux:8::appstreampostgres-decoderbufs, postgres-decoderbufs-debuginfo, postgres-decoderbufs-debugsource0:1.9.7-1.Final.module+el8.9.0+19797+c4ce5969RHSA-2024:6001
Red Hatenterprise_linux:8::appstreampostgres-decoderbufs, postgres-decoderbufs-debuginfo, postgres-decoderbufs-debugsource0:2.4.0-1.Final.module+el8.10.0+20413+d8116364RHSA-2024:5927
51 more for Red Hat in the JSON and on Red Hat's page.
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP2-LTSS, Linux Enterprise High Performance Computing 15 SP3-LTSS and 13 morepostgresql1616.4-150200.5.16.1SUSE-SU-2024:3170-1
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP2-LTSS, Linux Enterprise High Performance Computing 15 SP3-LTSS and 12 morepostgresql1414.13-150200.5.47.1SUSE-SU-2024:3169-1
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP2-LTSS, Linux Enterprise High Performance Computing 15 SP3-LTSS and 8 morepostgresql1313.16-150200.5.61.1SUSE-SU-2024:3171-1
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP2-LTSS, Linux Enterprise High Performance Computing 15 SP3-LTSS and 4 morepostgresql1212.20-150200.8.63.1SUSE-SU-2024:3153-1
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP3-LTSS, Linux Enterprise High Performance Computing 15 SP4-ESPOS and 9 morepostgresql1515.8-150200.5.30.1SUSE-SU-2024:3168-1
SUSELinux Enterprise Module for Basesystem 15 SP6, Linux Enterprise Module for Server Applications 15 SP6postgresql1616.4-150600.16.5.1SUSE-SU-2024:3159-1
SUSELinux Enterprise Module for Legacy 15 SP6postgresql1515.8-150600.16.6.1SUSE-SU-2024:3158-1 SUSE-SU-2024:3158-2 SUSE-SU-2024:3158-3
SUSELinux Enterprise Module for Legacy 15 SP6, Linux Enterprise Module for Package Hub 15 SP6postgresql1414.13-150600.16.6.1SUSE-SU-2024:3160-1
SUSELinux Enterprise Module for Package Hub 15 SP6postgresql1616.4-150600.16.5.1SUSE-SU-2024:3159-2
SUSELinux Enterprise Server 12 SP5, Linux Enterprise Server for SAP Applications 12 SP5, Linux Enterprise Software Development Kit 12 SP5postgresql1212.20-3.58.1SUSE-SU-2024:3191-1
SUSELinux Enterprise Server 12 SP5, Linux Enterprise Server for SAP Applications 12 SP5, Linux Enterprise Software Development Kit 12 SP5postgresql1313.16-3.52.1SUSE-SU-2024:3192-1
SUSELinux Enterprise Server 12 SP5, Linux Enterprise Server for SAP Applications 12 SP5, Linux Enterprise Software Development Kit 12 SP5postgresql1414.13-3.44.1SUSE-SU-2024:3154-1
2 more for SUSE in the JSON and on SUSE's page.
openSUSELeap 15.5postgresql1414.13-150200.5.47.1SUSE-SU-2024:3169-1
openSUSELeap 15.5postgresql1515.8-150200.5.30.1SUSE-SU-2024:3168-1
openSUSELeap 15.5postgresql16, postgresql16-mini16.4-150200.5.16.1SUSE-SU-2024:3170-1
openSUSELeap 15.5, Leap 15.6postgresql1212.20-150200.8.63.1SUSE-SU-2024:3153-1
openSUSELeap 15.5, Leap 15.6postgresql1313.16-150200.5.61.1SUSE-SU-2024:3171-1
openSUSELeap 15.6postgresql1414.13-150600.16.6.1SUSE-SU-2024:3160-1
openSUSELeap 15.6postgresql1515.8-150600.16.6.1SUSE-SU-2024:3158-1
openSUSELeap 15.6postgresql1616.4-150600.16.5.1SUSE-SU-2024:3159-1
openSUSETumbleweedpostgresql1212.20-1.1openSUSE-SU-2024:14348-1
openSUSETumbleweedpostgresql1313.16-1.1openSUSE-SU-2024:14349-1
openSUSETumbleweedpostgresql1414.13-1.1openSUSE-SU-2024:14350-1
openSUSETumbleweedpostgresql1515.8-1.1openSUSE-SU-2024:14351-1
3 more for openSUSE in the JSON and on openSUSE's page.
AlmaLinux8pg_repack1.4.6-3.module_el8.6.0+2760+1746ec94ALSA-2024:6018
AlmaLinux8pg_repack1.4.6-3.module_el8.6.0+3095+ee60d910ALSA-2024:6018
AlmaLinux8pg_repack1.4.6-3.module_el8.9.0+3704+f1f917ceALSA-2024:6000
AlmaLinux8pg_repack1.4.8-1.module_el8.10.0+3798+606ebb9fALSA-2024:5927
AlmaLinux8pg_repack1.4.8-1.module_el8.9.0+3706+885c732eALSA-2024:6001
AlmaLinux8pgaudit1.4.0-7.module_el8.9.0+3740+0e74851f.alma.1ALSA-2024:6000
AlmaLinux8pgaudit1.5.0-1.module_el8.6.0+2760+1746ec94ALSA-2024:6018
AlmaLinux8pgaudit1.5.0-1.module_el8.6.0+3095+ee60d910ALSA-2024:6018
AlmaLinux8pgaudit1.7.0-1.module_el8.9.0+3706+885c732eALSA-2024:6001
AlmaLinux8pgaudit16.0-1.module_el8.10.0+3798+606ebb9fALSA-2024:5927
AlmaLinux8postgres-decoderbufs0.10.0-2.module_el8.6.0+2760+1746ec94ALSA-2024:6018
AlmaLinux8postgres-decoderbufs0.10.0-2.module_el8.6.0+3095+ee60d910ALSA-2024:6018
16 more for AlmaLinux in the JSON.
Rocky Linux8pg_repack0:1.4.6-3.module+el8.10.0+1862+29bef648RLSA-2024:6000 RLSA-2024:6018
Rocky Linux8pg_repack0:1.4.6-3.module+el8.9.0+1594+4a6adae9RLSA-2024:6018
Rocky Linux8pg_repack0:1.4.6-3.module+el8.9.0+1603+444d1b54RLSA-2024:6018
Rocky Linux8pg_repack0:1.4.8-1.module+el8.10.0+1622+bd25b19cRLSA-2024:5927 RLSA-2024:6001
Rocky Linux8pg_repack0:1.4.8-1.module+el8.10.0+1858+fcc46a79RLSA-2024:6001
Rocky Linux8pg_repack0:1.4.8-1.module+el8.9.0+1525+fc91df60RLSA-2024:6001
Rocky Linux8pgaudit0:1.4.0-7.module+el8.9.0+1735+a332307bRLSA-2024:6000
Rocky Linux8pgaudit0:1.5.0-1.module+el8.9.0+1594+4a6adae9RLSA-2024:6018
Rocky Linux8pgaudit0:1.7.0-1.module+el8.9.0+1525+fc91df60RLSA-2024:6001
Rocky Linux8pgaudit0:16.0-1.module+el8.10.0+1622+bd25b19cRLSA-2024:5927
Rocky Linux8postgres-decoderbufs0:0.10.0-2.module+el8.10.0+1862+29bef648RLSA-2024:6000 RLSA-2024:6018
Rocky Linux8postgres-decoderbufs0:0.10.0-2.module+el8.9.0+1594+4a6adae9RLSA-2024:6018
12 more for Rocky Linux in the JSON.
Alpinev3.17, v3.18postgresql1212.20-r0ALPINE-CVE-2024-7348
Alpinev3.17, v3.18, v3.19postgresql1313.16-r0ALPINE-CVE-2024-7348
Alpinev3.17, v3.18, v3.19 and 1 morepostgresql1414.13-r0ALPINE-CVE-2024-7348
Alpinev3.17, v3.18, v3.19 and 3 morepostgresql1515.8-r0ALPINE-CVE-2024-7348
Alpinev3.19, v3.20, v3.21 and 3 morepostgresql1616.4-r0ALPINE-CVE-2024-7348
Azure Linux2postgresql14.13-1AZL-47690
Azure Linux3postgresql16.4-1AZL-47636
Alpaquita23postgresql1515.8-r0BELL-CVE-2024-7348

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; the Alpine secdb, CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine · Alpaquita.

Red Hat

Red Hat rates this Important.

Red Hat's statement

Satellite PostgreSQL is pulled through a base layered OS product and/or appstream repository and it is not shipped through this offering.

This TOCTOU race condition in pg_dump is a important severity issue because it enables a non-privileged database user to escalate their privileges and execute arbitrary SQL functions as the superuser, compromising the entire database system. The exploitation of this vulnerability is particularly dangerous due to the inherent privilege level associated with the pg_dump process, which typically operates with elevated rights to ensure comprehensive backups. The ease of exploitation—due to the trivial nature of winning the race condition by holding an open transaction—further amplifies the risk, making it a significant threat in environments running affected PostgreSQL versions.

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 7 Extended Lifecycle Supportpostgresql-0:9.2.24-9.el7_9.1Fixed 2024-10-28RHSA-2024:8495
Red Hat Enterprise Linux 8postgresql:16-8100020240814094432.489197e6Fixed 2024-08-28RHSA-2024:5927
Red Hat Enterprise Linux 8postgresql:12-8100020240814102525.489197e6Fixed 2024-08-29RHSA-2024:6000
Red Hat Enterprise Linux 8postgresql:15-8100020240814101911.489197e6Fixed 2024-08-29RHSA-2024:6001
Red Hat Enterprise Linux 8postgresql:13-8100020240814102212.489197e6Fixed 2024-08-29RHSA-2024:6018
Red Hat Enterprise Linux 8.2 Advanced Update Supportpostgresql:12-8020020240828083606.4cda2c84Fixed 2024-09-03RHSA-2024:6138
Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Supportpostgresql:12-8040020240827125019.522a0ee4Fixed 2024-09-03RHSA-2024:6139
Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Supportpostgresql:13-8040020240830114010.522a0ee4Fixed 2024-09-10RHSA-2024:6557
Red Hat Enterprise Linux 8.4 Telecommunications Update Servicepostgresql:12-8040020240827125019.522a0ee4Fixed 2024-09-03RHSA-2024:6139
Red Hat Enterprise Linux 8.4 Telecommunications Update Servicepostgresql:13-8040020240830114010.522a0ee4Fixed 2024-09-10RHSA-2024:6557
Red Hat Enterprise Linux 8.4 Update Services for SAP Solutionspostgresql:12-8040020240827125019.522a0ee4Fixed 2024-09-03RHSA-2024:6139
Red Hat Enterprise Linux 8.4 Update Services for SAP Solutionspostgresql:13-8040020240830114010.522a0ee4Fixed 2024-09-10RHSA-2024:6557
Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Supportpostgresql:13-8060020240903094008.ad008a3aFixed 2024-09-10RHSA-2024:6558
Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Supportpostgresql:12-8060020240903093929.ad008a3aFixed 2024-09-10RHSA-2024:6559
Red Hat Enterprise Linux 8.6 Telecommunications Update Servicepostgresql:13-8060020240903094008.ad008a3aFixed 2024-09-10RHSA-2024:6558
Red Hat Enterprise Linux 8.6 Telecommunications Update Servicepostgresql:12-8060020240903093929.ad008a3aFixed 2024-09-10RHSA-2024:6559
Red Hat Enterprise Linux 8.6 Update Services for SAP Solutionspostgresql:13-8060020240903094008.ad008a3aFixed 2024-09-10RHSA-2024:6558
Red Hat Enterprise Linux 8.6 Update Services for SAP Solutionspostgresql:12-8060020240903093929.ad008a3aFixed 2024-09-10RHSA-2024:6559
Red Hat Enterprise Linux 10postgresql16Not affected
Red Hat Enterprise Linux 6postgresqlNot affected
9 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2024-7348.

ICS advisories (CISA)

AdvisoryTitlePublishedSectorsAffectedFixed
ICSA-26-120-06ABB Ability Symphony Plus Engineering2026-04-13Chemical, Critical Manufacturing, Energy, Water and Wastewater, Water and WastewaterABB Ability Symphony Plus S+ Engineering 2.2, ABB Ability Symphony Plus S+ Engineering 2.3, ABB Ability Symphony Plus S+ Engineering 2.3 RU1 and 5 moreABB Ability Symphony Plus S+ Engineering 2.4 SP2 RU1

From CISA's ICS advisories (CSAF), provided under CISA's notification. Only the facts are shown; each advisory is on CISA's page. Credits.

Attack patterns (CAPEC)

  • CAPEC-27 Leveraging Race Conditions via Symbolic Links Likelihood: Medium · Severity: High
  • CAPEC-29 Leveraging Time-of-Check and Time-of-Use (TOCTOU) Race Conditions Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON