2.1

CVE-2026-5958: Race Condition in GNU Sed

Deferred
AliasesMGASA-2026-0128SUSE-SU-2026:22256-1SUSE-SU-2026:22325-1
Published 20-04-2026Last modified 13-05-2026

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.

Overall risk
8/100
0100
Minimal · default modelHow is this calculated?
CVSS score
2.1/10
010
Low · v4.0 (CVE.org)
EPSS score
0.14%
0%100%
Low · -0.01 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits0No public exploits recorded

Advisory lineage

Upstream 0 · Downstream 0 · Related 1

Timeline

  1. 20-04-2026
    PublishedVulnerability first disclosed.
  2. 13-05-2026
    Last 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

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

22-09-202622-10-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected 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
Show all 22 references