### [CVE-2024-7348](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-7348) ![](https://img.shields.io/static/v1?label=Product&message=PostgreSQL&color=blue) ![](https://img.shields.io/static/v1?label=Version&message=16%3C%2016.4%20&color=brighgreen) ![](https://img.shields.io/static/v1?label=Vulnerability&message=Time-of-check%20Time-of-use%20(TOCTOU)%20Race%20Condition&color=brighgreen) ### 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. ### POC #### Reference No PoCs from references. #### Github - https://github.com/crozzy/vex-mcp - https://github.com/fkie-cad/nvd-json-data-feeds - https://github.com/lekctut/sdb-hw-13-01 - https://github.com/pedr0alencar/vlab-metasploitable2