Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2026-5958— Race Condition in GNU Sed

Quick assessment

Affected
GNU Sed
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

GNU Sed是美国GNU社区的一个用于文本流编辑与批量处理的命令行工具。 GNU Sed存在安全漏洞,该漏洞源于同时使用-i和--follow-symlinks选项时存在竞争条件,可能导致攻击者任意覆盖文件。

AI Predicted 8.4 Difficulty: Moderate EPSS 0.14% · P3

Possible ATT&CK Techniques 2 AI

T1079 T1222.001 · Windows Permissions

Affected Version Matrix 1

VendorProduct Version RangeStatus
GNU Sed 4.1e< 4.10 affected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-5958

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
Race Condition in GNU Sed
Source: CVE Program / CVE List V5
Vulnerability 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.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
Source: CVE Program / CVE List V5
Vulnerability Type
检查时间与使用时间(TOCTOU)的竞争条件
Source: CVE Program / CVE List V5
Vulnerability Title
GNU Sed 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
GNU Sed是美国GNU社区的一个用于文本流编辑与批量处理的命令行工具。 GNU Sed存在安全漏洞,该漏洞源于同时使用-i和--follow-symlinks选项时存在竞争条件,可能导致攻击者任意覆盖文件。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
GNU Sed 4.1e ~ 4.10 -

II. Public POCs for CVE-2026-5958

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2026-5958

请登录查看更多情报信息。

IV. Related Vulnerabilities

V. Comments for CVE-2026-5958

No comments yet


Leave a comment