CVE-2026-5958: Race Condition in GNU Sed
Vulnerability summary
CVE-2026-5958 is a low (CVSS 2.1) vulnerability in gnu sed. EPSS estimates a 0.14% chance of exploitation in the next 30 days, higher than 2.8% of scored vulnerabilities.
Advisory lineage
Upstream 0 · Downstream 0 · Related 1Timeline
- 20-04-2026PublishedVulnerability first disclosed.
- 13-05-2026Last modifiedVulnerability information updated.
Description
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.
CVSS metrics
5 scores · 5 sources · 2 versions- OSV · UbuntuEcosystem advisory · calculated2.1LowCVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
- OSV · DebianEcosystem advisory · calculated2.1LowCVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
- NVDNIST2.1LowCVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
EPSS trend
Probability
0.14%
Chance of exploitation in the next 30 days
Percentile
3%
Versus all other CVEs
30-day change
Decrease -0.01 pp
From 0.14% on 22-09-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Suse3 products
- sed&distro=SUSE Linux Enterprise Server 16.0< 4.9-160000.3.1
- sed&distro=SUSE Linux Enterprise Server for SAP applications 16.0< 4.9-160000.3.1
- sed&distro=SUSE Linux Micro 6.2< 4.9-160000.3.1
Opensuse2 products
- sed&distro=openSUSE Leap 16.0< 4.9-160000.3.1
- sed&distro=openSUSE Tumbleweed< 4.10-1.1
Debian1 product
- sed< 4.9-1+deb12u1 | < 4.9-2+deb13u1 | < 4.9-3
Gnu1 product
- sed≥ 4.1e, < 4.10
Mageia1 product
- sed< 4.9-1.1.mga9
Redhat1 product
- sed< 0:4.10-1.hum1
Ubuntu1 product
- sed< 4.8-1ubuntu2.1 | < 4.9-2ubuntu0.24.04.1 | < 4.9-2ubuntu0.25.10.1 | < 4.9-2ubuntu1 | < 4.4-2ubuntu0.1~esm1 | < 4.7-1ubuntu0.1~esm1
7 vendors · 10 products
References
22 links- www.gnu.org/software/sed/Product
- cert.pl/en/posts/2026/04/CVE-2026-5958Third Party Advisory
Show all 22 references
- images.redhat.comARTICLE