CVE-2026-86541
8.3knowns-dev · knowns
The handleCodeReplace function in knowns before 0.30.0 is vulnerable to path traversal, allowing unauthenticated attackers to overwrite arbitrary files on the host system.
Executive summary
A critical path traversal vulnerability in knowns versions prior to 0.30.0 allows unauthenticated attackers to overwrite sensitive system files, posing a severe risk of remote code execution.
Vulnerability
The application fails to properly sanitize file paths within the handleCodeReplace function, permitting the use of absolute or relative traversal sequences. This flaw allows an unauthenticated attacker to escape the intended project directory and overwrite critical files, such as SSH configurations or shell startup scripts.
Business impact
Successful exploitation grants an attacker the ability to modify or corrupt sensitive files on the server, which can lead to full system compromise or persistence. Given the CVSS score of 8.3, this vulnerability represents a high-severity risk that could result in unauthorized administrative access, service disruption, and the potential theft of credentials or sensitive data stored within the environment.
Remediation
Immediate Action: Update the knowns package to version 0.30.0 or later immediately to incorporate the necessary path validation fixes.
Proactive Monitoring: Review system logs for unauthorized file write attempts or suspicious modifications to sensitive configuration files in restricted directories.
Compensating Controls: If immediate patching is not feasible, restrict network access to the knowns instance using a Web Application Firewall or network access control lists to prevent external interaction with the vulnerable tool.
Exploitation status
Public Exploit Available: No
Analyst recommendation
The severity of this path traversal vulnerability necessitates an immediate upgrade to the latest stable release. Organizations should prioritize patching knowns environments to eliminate the risk of arbitrary file overwriting, as the potential for system takeover is significant.
More knowns-dev CVEs
History
- Disclosed CVE record published
- Collected by CVE Brief via github
- Analyst report written
- Published in the daily brief high section
Sources
Originally found and disclosed by Tong Hoang Gia, Nguyen Huy Hoang, per the CVE Program record.
- GitHub Security Advisory (GHSA-f539-xgc6-xw7q) Vendor advisory
- handleCodeReplace resolves and writes the caller-supplied path without containment (v0.29.1) Technical analysis
- knowns fix commit a2c98fc5c313 Patch commit
- knowns v0.30.0 Release Notes Release notes
- VulnCheck Advisory: knowns before 0.30.0 Path Traversal via code.replace MCP action Third-party advisory