CVE-2026-5958

Race Condition in GNU Sed

LOW
2.1
CVSS Score
Published: April 20, 2026 at 11:59 AM UTC
Updated: June 17, 2026 at 10:59 AM UTC
1 product affected across 1 vendorSed

Using Sed by GNU?

Get instant alerts when new vulnerabilities affect Sed - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
LOW2.1
Exploit prediction
EPSS 0.1%
SSVC
No known exploit

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

4.1e ≤ v < 4.104.1e
Affected range stops below 4.10, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet, and no fixed version or vendor advisory is recorded against it.

References (3)

Product
Source: cverecord
https://www.gnu.org/software/sed/
Third Party Advisory
Source: cverecord
https://cert.pl/en/posts/2026/04/CVE-2026-5958
Source: af854a3a-2127-422b-91ae-364da2661108
http://www.openwall.com/lists/oss-security/2026/05/13/1

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

2.1LOWCERT-PL
Vector?

Quick Info

StatusDEFERRED
CWE
CWE-367

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card