GNU sed symlink race enables file overwrite
A TOCTOU race in GNU sed's -i --follow-symlinks option lets attackers overwrite arbitrary files; fixed in sed 4.10.
Sourcecert.pl — open the original
What to check
- Applies to
- The 1 CVE named below. Whether you run an affected version is not assessed: check the versions the source lists.
- Exploitation
- No exploitation in the wild and no public exploit is recorded for the CVEs named.
CERT Polska coordinated disclosure of CVE-2026-5958, a race condition vulnerability in GNU sed affecting the combination of the -i (in-place edit) and --follow-symlinks options. The flaw stems from open_next_file() performing two non-atomic filesystem operations on the same path: first resolving a symlink to determine the output destination, then separately opening the original symlink path to read content. An attacker who can atomically swap the symlink target between these two operations can cause sed to read attacker-controlled data and write it to the path resolved in the first step, resulting in arbitrary file overwrite in the context of the sed process.
Mentioned in this report
Source reporting: https://cert.pl/en/posts/2026/04/CVE-2026-5958
Free public brief. Slack alerts on the vendors you run come with the paid plans, and a new account gets three days of them, no card.
What this brief leaves out
This page is the free tier: the write-up, the severity, the names. In the app the same report carries live profiles of the CVEs it names. The paid plans add the security research and news reporting the free tier leaves out.
It sits in a corpus of 16,436 reports from 149 sources, 661 of them written in the last seven days, and it grows through the day.
A new account starts with three days of all of it, no card, then keeps the government and CERT reporting free. Slack alerts are a paid-plan feature: name the vendors you run and Slack hears about the reports that touch them, not the rest of the week's. Nothing is charged unless you subscribe.
Create a free account What it costs