CVE-2026-5958
Last modified
CVE-2026-5958 is a low-severity vulnerability rated 2.1/10 on the CVSS scale. 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. EPSS estimates a 0.14% chance of exploitation in the next 30 days.
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.
Metrics
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/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
Weakness Enumeration
References
Timeline
- Published
- Last Modified
- Status
- Deferred
Frequently Asked Questions
What is CVE-2026-5958?
How severe is CVE-2026-5958?
How do I fix CVE-2026-5958?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2026
- CVE-2026-59556Unauthenticated Cross Site Scripting (XSS) in Dynamic Pricin…7.1
- CVE-2026-59557Unauthenticated Broken Access Control in Events Made Easy <=…6.5
- CVE-2026-59558Unauthenticated Cross Site Scripting (XSS) in Booking Calend…7.1
- CVE-2026-59559Subscriber Cross Site Scripting (XSS) in RT Mega Menu – Mega…6.5
- CVE-2026-59560Subscriber Broken Access Control in FundEngine <= 1.7.8 vers…6.5
- CVE-2026-5957The EmailKit plugin for WordPress is vulnerable to Arbitrary…6.5
- CVE-2026-5959A security flaw has been discovered in GL.iNet GL-RM1, GL-RM…7.5
- CVE-2026-5960A weakness has been identified in code-projects Patient Reco…4.3
- CVE-2026-5961A security vulnerability has been detected in code-projects …7.3
- CVE-2026-5962A vulnerability was detected in Tenda CH22 1.0.0.6(468). Thi…9.8
- CVE-2026-5963EasyFlow .NET developed by Digiwin has a SQL Injection vulne…9.8
- CVE-2026-59638In Bouncy Castle for Java before 1.85, JSSE hostname verifie…9.3
Are you affected by CVE-2026-5958?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
