BIT-postgresql-2024-7348: Race Condition
Time-of-check Time-of-use (TOCTOU) race condition in pgdump in PostgreSQL allows an object creator to execute arbitrary SQL functions as the user running pgdump, which is often a superuser. The attack involves replacing another relation type with a view or foreign table. The attack requires waiting for pgdump 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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 16.4 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 15.8 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 14.13 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 13.16 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 12.20