Report
CVE-2023-7008: TOCTOU symlink race in sed --follow-symlinks
776f9569-b072-40d7-9b7b-27febb088548
GNU sed's in-place editing (-i) with --follow-symlinks flag contains a Time-of-Check-Time-of-Use (TOCTOU) race condition. The code resolves a symbolic link to get the real file path, but then opens the original symlink path instead of the resolved path. Between the symlink resolution and file open, an attacker can change the symlink target, causing sed to open and modify an unintended file.