CVE Vulnerabilities

CVE-2024-7348

Time-of-check Time-of-use (TOCTOU) Race Condition

Published: Aug 08, 2024 | Modified: Aug 12, 2024
CVSS 3.x
7.5
HIGH
Source:
NVD
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS 2.x
RedHat/V2
RedHat/V3
7.5 IMPORTANT
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
Ubuntu
MEDIUM

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.

Weakness

The product checks the state of a resource before using that resource, but the resource’s state can change between the check and the use in a way that invalidates the results of the check. This can cause the product to perform invalid actions when the resource is in an unexpected state.

Affected Software

Name Vendor Start Version End Version
Postgresql Postgresql 12.0 (including) 12.20 (excluding)
Postgresql Postgresql 13.0 (including) 13.16 (excluding)
Postgresql Postgresql 14.0 (including) 14.13 (excluding)
Postgresql Postgresql 15.0 (including) 15.8 (excluding)
Postgresql Postgresql 16.0 (including) 16.4 (excluding)
Red Hat Enterprise Linux 7 Extended Lifecycle Support RedHat postgresql-0:9.2.24-9.el7_9.1 *
Red Hat Enterprise Linux 8 RedHat postgresql:16-8100020240814094432.489197e6 *
Red Hat Enterprise Linux 8 RedHat postgresql:12-8100020240814102525.489197e6 *
Red Hat Enterprise Linux 8 RedHat postgresql:15-8100020240814101911.489197e6 *
Red Hat Enterprise Linux 8 RedHat postgresql:13-8100020240814102212.489197e6 *
Red Hat Enterprise Linux 8.2 Advanced Update Support RedHat postgresql:12-8020020240828083606.4cda2c84 *
Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support RedHat postgresql:12-8040020240827125019.522a0ee4 *
Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support RedHat postgresql:13-8040020240830114010.522a0ee4 *
Red Hat Enterprise Linux 8.4 Telecommunications Update Service RedHat postgresql:12-8040020240827125019.522a0ee4 *
Red Hat Enterprise Linux 8.4 Telecommunications Update Service RedHat postgresql:13-8040020240830114010.522a0ee4 *
Red Hat Enterprise Linux 8.4 Update Services for SAP Solutions RedHat postgresql:12-8040020240827125019.522a0ee4 *
Red Hat Enterprise Linux 8.4 Update Services for SAP Solutions RedHat postgresql:13-8040020240830114010.522a0ee4 *
Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Support RedHat postgresql:13-8060020240903094008.ad008a3a *
Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Support RedHat postgresql:12-8060020240903093929.ad008a3a *
Red Hat Enterprise Linux 8.6 Telecommunications Update Service RedHat postgresql:13-8060020240903094008.ad008a3a *
Red Hat Enterprise Linux 8.6 Telecommunications Update Service RedHat postgresql:12-8060020240903093929.ad008a3a *
Red Hat Enterprise Linux 8.6 Update Services for SAP Solutions RedHat postgresql:13-8060020240903094008.ad008a3a *
Red Hat Enterprise Linux 8.6 Update Services for SAP Solutions RedHat postgresql:12-8060020240903093929.ad008a3a *
Red Hat Enterprise Linux 8.8 Extended Update Support RedHat postgresql:12-8080020240828084611.63b34585 *
Red Hat Enterprise Linux 8.8 Extended Update Support RedHat postgresql:13-8080020240830064706.63b34585 *
Red Hat Enterprise Linux 8.8 Extended Update Support RedHat postgresql:15-8080020240826125709.63b34585 *
Red Hat Enterprise Linux 9 RedHat postgresql:16-9040020240812093225.rhel9 *
Red Hat Enterprise Linux 9 RedHat postgresql-0:13.16-1.el9_4 *
Red Hat Enterprise Linux 9 RedHat postgresql:15-9040020240812115436.rhel9 *
Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions RedHat postgresql-0:13.16-1.el9_0 *
Red Hat Enterprise Linux 9.2 Extended Update Support RedHat postgresql:15-9020020240827093843.rhel9 *
Red Hat Enterprise Linux 9.2 Extended Update Support RedHat postgresql-0:13.16-1.el9_2 *
Postgresql-10 Ubuntu esm-infra/bionic *
Postgresql-12 Ubuntu focal *
Postgresql-14 Ubuntu jammy *
Postgresql-16 Ubuntu noble *
Postgresql-9.3 Ubuntu trusty/esm *
Postgresql-9.5 Ubuntu esm-infra/xenial *

Potential Mitigations

References