{"id":"CVE-2024-7348","details":"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.","aliases":["BIT-postgresql-2024-7348"],"modified":"2026-04-16T04:33:11.734684401Z","published":"2024-08-08T13:15:14.007Z","related":["ALSA-2024:5927","ALSA-2024:5929","ALSA-2024:5999","ALSA-2024:6000","ALSA-2024:6001","ALSA-2024:6018","ALSA-2024:6020","CGA-xfhp-65gf-rp6w","SUSE-SU-2024:3153-1","SUSE-SU-2024:3154-1","SUSE-SU-2024:3158-1","SUSE-SU-2024:3158-2","SUSE-SU-2024:3158-3","SUSE-SU-2024:3159-1","SUSE-SU-2024:3159-2","SUSE-SU-2024:3160-1","SUSE-SU-2024:3168-1","SUSE-SU-2024:3169-1","SUSE-SU-2024:3170-1","SUSE-SU-2024:3171-1","SUSE-SU-2024:3181-1","SUSE-SU-2024:3191-1","SUSE-SU-2024:3192-1","SUSE-SU-2024:3224-1","openSUSE-SU-2024:14348-1","openSUSE-SU-2024:14349-1","openSUSE-SU-2024:14350-1","openSUSE-SU-2024:14351-1","openSUSE-SU-2024:14360-1","openSUSE-SU-2024:14361-1"],"references":[{"type":"WEB","url":"http://www.openwall.com/lists/oss-security/2024/08/11/1"},{"type":"ADVISORY","url":"https://www.postgresql.org/support/security/CVE-2024-7348/"},{"type":"ADVISORY","url":"https://security.netapp.com/advisory/ntap-20240822-0002/"}],"affected":[{"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-7348.json","unresolved_ranges":[{"events":[{"introduced":"12.0"},{"fixed":"12.20"}]},{"events":[{"introduced":"13.0"},{"fixed":"13.16"}]},{"events":[{"introduced":"14.0"},{"fixed":"14.13"}]},{"events":[{"introduced":"15.0"},{"fixed":"15.8"}]},{"events":[{"introduced":"16.0"},{"fixed":"16.4"}]}]}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H"}]}