CVE-2026-81837 in Roo-Codeinfo

Summary

by MITRE • 08/28/2026

A flaw has been found in RooCodeInc Roo-Code up to 3.51.1. This issue affects the function path.resolve of the file src/core/tools/ApplyPatchTool.ts of the component ApplyPatchTool. This manipulation causes path traversal. It is possible to initiate the attack remotely. The exploit has been published and may be used. Multiple isses were reported to the vendor beforehand. They explain, that "they all apply to Roo Code, a project we no longer support - the repository was archived a while ago, and we don't encourage anyone to use it." This vulnerability only affects products that are no longer supported by the maintainer.

If you want to get best quality of vulnerability data, you may have to visit VulDB.

Analysis

by VulDB Data Team • 08/28/2026

The identified security flaw resides within the ApplyPatchTool component of RooCodeInc's Roo-Code software, specifically affecting versions up to 3.51.1. The vulnerability is located in the path.resolve function found in the source file src/core/tools/ApplyPatchTool.ts. This implementation error results in a classic path traversal weakness, allowing an attacker to manipulate file system paths beyond their intended directory boundaries. Such flaws typically arise when user-supplied input is not adequately sanitized before being processed by functions that resolve absolute or relative paths against a base directory. In this context, the improper handling of these inputs enables the execution of arbitrary operations on files located outside the expected sandboxed environment, potentially leading to unauthorized access, data exfiltration, or system compromise depending on the privileges under which the application runs.

From a technical perspective, this vulnerability aligns with Common Weakness Enumeration identifier CWE-22: Improper Limitation of a Pathname to a Restricted Directory. The core issue lies in the failure to properly canonicalize and validate file paths before performing operations such as reading or writing patches. When path.resolve is used without strict validation against a predefined root directory, an attacker can inject sequences like dot-dot-slash (../) to traverse up the directory tree. This allows access to sensitive configuration files, source code repositories, or other critical system resources that should remain isolated from user-controlled inputs. The presence of this flaw indicates a lack of robust input validation and path normalization checks within the tool's patch application logic.

The operational impact of this vulnerability is significant due to its remote exploitability. Since the attack can be initiated remotely, an adversary does not need local access or physical proximity to the target system to leverage this weakness. The fact that public exploits have been published further exacerbates the risk, as it lowers the barrier for entry for less sophisticated attackers who may utilize automated scanning tools or existing proof-of-concept code to identify and compromise vulnerable instances. Successful exploitation could lead to a complete breach of confidentiality and integrity for any data accessible by the application process, potentially exposing proprietary algorithms, user credentials, or other sensitive information stored in adjacent directories.

Despite the severity of this technical flaw, it is crucial to contextualize its real-world risk based on the vendor's current stance. RooCodeInc has explicitly stated that they no longer support Roo Code and have archived the repository, advising against its continued use. This means there are no forthcoming security patches or updates from the maintainer to remediate this issue. Consequently, any organization or individual still deploying versions of Roo-Code up to 3.51.1 is operating with an unpatched vulnerability that remains actively exploitable in the wild. The lack of vendor support implies that mitigation must be handled entirely by the user through operational controls rather than software updates.

To mitigate this risk, immediate action should focus on discontinuing the use of Roo-Code if possible. For environments where legacy systems cannot be immediately decommissioned, strict network segmentation and access control lists are recommended to limit exposure to untrusted networks. Additionally, implementing file integrity monitoring can help detect unauthorized changes resulting from potential exploitation attempts. From a broader security architecture standpoint, this incident underscores the importance of maintaining an accurate inventory of software assets and retiring unsupported projects promptly. Organizations should also enforce secure coding practices that mandate rigorous input validation and path canonicalization in all tools handling user-supplied data to prevent similar CWE-22 vulnerabilities in future developments or alternative solutions.

Responsible

VulDB

Disclosure

08/28/2026

Moderation

accepted

CPE

ready

Exploit

Download

EPSS

0.00000

KEV

no

Activities

low

Sources

Do you need the next level of professionalism?

Upgrade your account now!