{"id":"CVE-2024-7348","year":2024,"sequence":7348,"component":"core server","score":8.8,"cvss_version":"3.0","vector":"AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","first_published":"2024-08-08","source_url":"https://www.postgresql.org/support/security/CVE-2024-7348/","facts":{"affected":{"12":"12","13":"13","14":"14","15":"15","16":"16"},"affected_ranges":[{"from":"0","until":"12.20"},{"from":"13","until":"13.16"},{"from":"14","until":"14.13"},{"from":"15","until":"15.8"},{"from":"16","until":"16.4"}],"cna_url":"https://cveawg.mitre.org/api/cve/CVE-2024-7348","component":"core server","cvss_version":"3.0","description_en":"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.\n\nThe PostgreSQL project thanks Noah Misch for reporting this problem.","first_published":"2024-08-08","fixed":{"12":"12.20","13":"13.16","14":"14.13","15":"15.8","16":"16.4"},"id":"CVE-2024-7348","introduced":{},"published":{"12":"2024-08-08","13":"2024-08-08","14":"2024-08-08","15":"2024-08-08","16":"2024-08-08"},"score":8.8,"title":"PostgreSQL relation replacement during pg_dump executes arbitrary SQL","url":"https://www.postgresql.org/support/security/CVE-2024-7348/","vector":"AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"},"reviewed_hash":"6a65a7884245936f6adaef8709d290d460e999dfce1ad78734fa7c9a324ed325","source_hash":"965b9e2323feab543f3cbeb74c418c3a5b43cbefc6594d2862ff0d24dcf8e6a2","text":{"locale":"en","title":"PostgreSQL relation replacement during pg_dump executes arbitrary SQL","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.\n\nThe PostgreSQL project thanks Noah Misch for reporting this problem.","details":null,"format":"plain","provenance":{"fetched_at":"2026-09-26T10:56:06+00:00","path":"compare/security.json","root":"source-data","sha256":"6a65a7884245936f6adaef8709d290d460e999dfce1ad78734fa7c9a324ed325","source_archive_sha256":"8d8ad63581e1d27b3a0f995ded3feb81c265e38b2ac652eb22f022f52c2240ec","source_revision":"004bc292ee31c11f9a41ab007e9d8116bce29a71","source_url":"https://www.postgresql.org/support/security/"},"text_hash":"7826d31d7fd28e91954f52027d99b2f655c74666f2293bc7da9e1cb0360c5c4c"},"locales":["en","zh-Hans"],"fixes":[{"major":"12","fixed_version":"12.20","introduced":null,"published_date":"2024-08-08","facts":{"fixed":"12.20","introduced":null,"published":"2024-08-08"}},{"major":"13","fixed_version":"13.16","introduced":null,"published_date":"2024-08-08","facts":{"fixed":"13.16","introduced":null,"published":"2024-08-08"}},{"major":"14","fixed_version":"14.13","introduced":null,"published_date":"2024-08-08","facts":{"fixed":"14.13","introduced":null,"published":"2024-08-08"}},{"major":"15","fixed_version":"15.8","introduced":null,"published_date":"2024-08-08","facts":{"fixed":"15.8","introduced":null,"published":"2024-08-08"}},{"major":"16","fixed_version":"16.4","introduced":null,"published_date":"2024-08-08","facts":{"fixed":"16.4","introduced":null,"published":"2024-08-08"}}],"legacy":[{"source":"center","source_id":17,"observed_at":"2026-10-03 12:08:35.169032+08","raw":{"id":17,"cve":"2024-7348","public":true,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","details":null,"component":"core server","cvenumber":202407348,"description":"PostgreSQL 在 pg_dump 期间替换关系对象可执行任意 SQL","detailslink":"https://access.redhat.com/security/cve/CVE-2024-7348","legacyscore":"","newspost_id":null},"fixes":[{"source_id":68,"source_version_id":29,"major":"16","fixed_minor":4,"raw":{"id":68,"patch_id":17,"version_id":29,"fixed_minor":4},"version_raw":{"id":29,"tree":16.0,"current":false,"docsgit":"","eoldate":"2028-11-09","reldate":"2026-08-13","testing":0,"supported":true,"docsloaded":"2026-09-27T08:10:47.078613+08:00","latestminor":15,"firstreldate":"2023-09-14"}},{"source_id":69,"source_version_id":28,"major":"15","fixed_minor":8,"raw":{"id":69,"patch_id":17,"version_id":28,"fixed_minor":8},"version_raw":{"id":28,"tree":15.0,"current":false,"docsgit":"","eoldate":"2027-11-11","reldate":"2026-08-13","testing":0,"supported":true,"docsloaded":"2026-09-27T08:10:47.078613+08:00","latestminor":19,"firstreldate":"2022-10-13"}},{"source_id":70,"source_version_id":27,"major":"14","fixed_minor":13,"raw":{"id":70,"patch_id":17,"version_id":27,"fixed_minor":13},"version_raw":{"id":27,"tree":14.0,"current":false,"docsgit":"","eoldate":"2026-11-12","reldate":"2026-08-13","testing":0,"supported":true,"docsloaded":"2026-09-27T08:10:47.078613+08:00","latestminor":24,"firstreldate":"2021-09-30"}}]},{"source":"pgweb","source_id":17,"observed_at":"2026-10-03 12:08:55.967155+08","raw":{"id":17,"cve":"2024-7348","public":true,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","details":null,"component":"core server","cvenumber":202407348,"description":"PostgreSQL 在 pg_dump 期间替换关系对象可执行任意 SQL","detailslink":"https://access.redhat.com/security/cve/CVE-2024-7348","legacyscore":"","newspost_id":null},"fixes":[{"source_id":68,"source_version_id":29,"major":"16","fixed_minor":4,"raw":{"id":68,"patch_id":17,"version_id":29,"fixed_minor":4},"version_raw":{"id":29,"tree":16.0,"current":false,"docsgit":"","eoldate":"2028-11-09","reldate":"2026-08-13","testing":0,"supported":true,"docsloaded":"2026-09-27T00:10:45.258078+08:00","latestminor":15,"firstreldate":"2023-09-14"}},{"source_id":69,"source_version_id":28,"major":"15","fixed_minor":8,"raw":{"id":69,"patch_id":17,"version_id":28,"fixed_minor":8},"version_raw":{"id":28,"tree":15.0,"current":false,"docsgit":"","eoldate":"2027-11-11","reldate":"2026-08-13","testing":0,"supported":true,"docsloaded":"2026-09-27T00:10:45.258078+08:00","latestminor":19,"firstreldate":"2022-10-13"}},{"source_id":70,"source_version_id":27,"major":"14","fixed_minor":13,"raw":{"id":70,"patch_id":17,"version_id":27,"fixed_minor":13},"version_raw":{"id":27,"tree":14.0,"current":false,"docsgit":"","eoldate":"2026-11-12","reldate":"2026-08-13","testing":0,"supported":true,"docsloaded":"2026-09-27T00:10:45.258078+08:00","latestminor":24,"firstreldate":"2021-09-30"}}]}]}
