Race Condition in GNU Sed
CVE-2026-5958 is fixed in sed on 1 platform, first by sed 4.4-2ubuntu0.1~esm1, released April 18, 2026. It is not reported as exploited. Patch Radar priority: Routine.
When sed is invoked with both -i (in-place edit) and --follow-symlinks, the function open_next_file() performs two separate, non-atomic filesystem operations on the same path: 1. resolves symlink to its target and stores the resolved path for determining when output is written, 2. opens the original symlink path (not the resolved one) to read the file. Between these two calls there is a race window. If an attacker atomically replaces the symlink with a different target during that window, sed will: read content from the new (attacker-chosen) symlink target and write the processed result to the path recorded in step 1. This can lead to arbitrary file overwrite with attacker-controlled content in the context of the sed process. This issue was fixed in version 4.10.
Where it's fixed
| Product | Fixed in | Fix | Released |
|---|---|---|---|
| Linux | |||
| sed · Debian 12.15 (bookworm) | 4.9-1+deb12u1 | DEBIAN-CVE-2026-5958 | May 15, 2026 |
| sed · Debian 13.5 (trixie) | 4.9-2+deb13u1 | DEBIAN-CVE-2026-5958 | May 15, 2026 |
| sed · Debian 14 | 4.9-3 | DEBIAN-CVE-2026-5958 | May 15, 2026 |
| sed · Ubuntu 18.04.6 LTS (bionic) | 4.4-2ubuntu0.1~esm1 | sed 4.4-2ubuntu0.1~esm1 | Apr 18, 2026 |
| sed · Ubuntu 20.04 LTS (focal) | 4.7-1ubuntu0.1~esm1 | sed 4.7-1ubuntu0.1~esm1 | Apr 18, 2026 |
| sed · Ubuntu 22.04.1 LTS (jammy) | 4.8-1ubuntu2.1 | sed 4.8-1ubuntu2.1 | May 15, 2026 |
| sed · Ubuntu 24.04.5 LTS (noble) | 4.9-2ubuntu0.24.04.1 | sed 4.9-2ubuntu0.24.04.1 | May 15, 2026 |
| sed · Ubuntu 25.10 (questing) | 4.9-2ubuntu0.25.10.1 | sed 4.9-2ubuntu0.25.10.1 | May 15, 2026 |
| sed · Ubuntu 26.04.1 LTS (resolute) | 4.9-2ubuntu1 | sed 4.9-2ubuntu1 | Apr 18, 2026 |
| sed · opensuse-leap 16.0 | 4.9-160000.3.1 | OPENSUSE-SU-2026:21024-1 | Jun 22, 2026 |
| sed · sles 16.0 | 4.9-160000.3.1 | SUSE-SU-2026:22325-1 | Jun 22, 2026 |
Patch Radar data is free to use with attribution. Terms and how to credit it.
Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.