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
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-59566A locally exploitable buffer overflow bug can cause a local …8.4
- CVE-2026-59567Multiple vulnerabilities on affected versions of Zscaler Cli…8.8
- CVE-2026-59568Multiple vulnerabilities on affected versions of Zscaler Cli…9.1
- CVE-2026-59569An improper input validation vulnerability in Zscaler Client…8.1
- CVE-2026-5957The EmailKit plugin for WordPress is vulnerable to Arbitrary…6.5
- CVE-2026-59570On affected versions of Zscaler client connector, a pre-inst…7.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…6.5
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
