Arbitrary File Overwrite in GNU sed due to Symlink Handling Vulnerability

2.1LOW

Key Information:

Vendor

Gnu

Status
CVE ID
CVE ID:
CVE-2026-5958
Vendor
CVE Published:
20 April 2026
Fixed in
Fixed in:
4.10

Timeline

  • Vulnerability published

  • Vulnerability Reserved

How risky is it?

  • No: Needs local access
  • No: No public exploit yet
  • No: Not on CISA's exploited list
  • No: No ransomware use seen

Our verdict

Monitor

Low risk for most. Patch in your normal cycle.

What to do

1Update to a fixed version
Sed 4.1e to below 4.10 is vulnerable
Install Sed 4.10 or later
Read the vendor advisory β†—
2Why it's rated "Monitor"
  • Its CVSS severity is low (2.1).

What is CVE-2026-5958?

A symlink handling vulnerability exists in GNU sed when invoked with the -i option for in-place edits coupled with --follow-symlinks. This flaw arises due to two non-atomic operations performed on the same path during symlink resolution. Specifically, sed resolves the symlink target and prepares to write output, while concurrently opening the original symlink path to read its content. This introduces a race condition where an attacker can replace the symlink with a different target, leading to sed potentially overwriting files with content chosen by the attacker. This security issue necessitates patching to version 4.10 or later to mitigate the risk.

References

Out-of-Bounds Write Vulnerability in GNU Inetutils Telnetd

CVE-2026-32746
GnuInetutilsπŸ”₯πŸ˜„πŸ‘Ύ9.8CRITICAL

Remote Authentication Bypass in GNU Inetutils Telnetd

CVE-2026-24061
GnuInetutilsπŸ”₯πŸ˜„πŸ‘Ύ9.8CRITICAL
View more Gnu vulnerabilities...

Facts on this page come from the sources listed above; the writeup is AI-assisted. How we rate vulnerabilities Β· Report a correction

CVSS V4

Score:
2.1
Severity:
LOW
Confidentiality:
None
Integrity:
Low
Availability:
None
Attack Vector:
Local
Attack Complexity:
Low
Attack Required:
Physical
Privileges Required:
Undefined
User Interaction:
None

Credit

MichaΕ‚ Majchrowicz (AFINE Team)
Marcin Wyczechowski (AFINE Team)
.