CVE-2026-5958
CVE-2026-5958 — Race Condition in GNU Sed
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.
Published Updated Sources: cvelistV5, CERT-PL
Triage
Is it exploited, how likely is exploitation, what does it touch, and how severe do the scoring sources call it.
Exploitation
Unreported
no source claims exploitation
EPSS
<1%
chance of exploitation in 30 days
CVSS base
2.1
LOW
CISA SSVC assessment
Three decision points CISA publishes for the CVEs it assesses · SSVC 2.0.3. A stakeholder decision, not a severity score.
Exploitation
None
none · proof-of-concept · active
Automatable
No
can an attacker script all four kill-chain steps
Technical impact
Partial
partial · total control of the vulnerable component
Affected scope
The catalog records vendors and products as separate lists, not pairs, so which product belongs to which vendor is not something this page can say.
Vendors (1)
Products (1)
Every base score collected
Sources score independently and disagree; each row says who scored it and under which version.
| Score | Version | Severity | Expl. | Impact | Source |
|---|---|---|---|---|---|
| 2.1 | CVSS 4.0 | LOW | n/a | n/a | cvelistV5 |
Weakness & attack patterns
- CWE-367
References
3 on the record
- www.gnu.org/software/sed/
product
- cert.pl/en/posts/2026/04/CVE-2026-5958
third-party-advisory
- www.openwall.com/lists/oss-security/2026/05/13/1
reference
Related CVEs
Same product first, then the same weakness or threat actor.
- CVE-2023-35311 Microsoft Outlook Security Feature Bypass VulnerabilityCVSS 8.8 · CISA KEV
- CVE-2025-22224 VMware ESXi and Workstation TOCTOU Race Condition VulnerabilityCVSS 8.2 · CISA KEV
- CVE-2026-119977 WordPress Core 4.7.0 - 7.1.3 - Unauthenticated Upgrade-Window Staged-Installer Remote Code ExecutionCVSS 8.1 · CISA KEV
- CVE-2025-38352 Linux Kernel Time-of-Check Time-of-Use (TOCTOU) Race Condition VulnerabilityCVSS 7.4 · CISA KEV
- CVE-2015-3246 Red Hat Libuser Race Condition VulnerabilityCVSS 7.2 · CISA KEV
- CVE-2024-30088 Microsoft Windows Kernel TOCTOU Race Condition VulnerabilityCVSS 7.0 · CISA KEV
Elsewhere on this site
Not in any source we poll
Listed rather than left blank: an empty field and an unmeasured one look identical on screen, and only one is a reason to look elsewhere.
- No confirmed IOCs, IP addresses, domains, file hashes, or malware artifacts supplied.
- No organization-specific asset inventory, compensating-control status, or patch deployment evidence supplied.
- No exploit packet captures, log samples, or incident case IDs supplied.