CVE-2026-81837

Roo Code patch paths could escape the workspace

RooCodeInc · Roo Code

First documented disclosure · Review checkpoint

Summary

A researcher describes ApplyPatchTool resolving supplied paths without enforcing workspace containment.

Severity and exploitation evidence

Medium · 5.3/10 · CVSS 4.0. Severity source.

Exploitation not established: Controlled researcher report only. No malicious deployment, affected victim or in-the-wild exploitation is established by these sources.

Exploitation evidence source

Technical severity is not a measure of observed attacks or of risk to your deployment. Attempts, demonstrations, and successful compromise retain the qualifications in the source.

How the weakness works

path.resolve can resolve a patch path outside the workspace when no boundary check rejects it.

Conditions required

User requests applying a supplied malicious patch and process has write access to the escaped path.

Potential impact

Writes outside the workspace where the agent account has permission. SSH persistence is an illustrative consequence, not a confirmed victim event.

Affected versions and configurations

CNA enumerates 3.51.0–3.51.1; the researcher report identifies 3.51.1. No current-version extrapolation is made.

Fix and mitigation status

Unknown; no released issue-specific correction established by the reviewed originals or CNA.

Practical next steps

Review patch paths, restrict writable mounts and enforce canonical path containment before writing. The suggested string-prefix check is not a verified correction.

Operating lesson

A resolved absolute path still needs an explicit containment check before a write.

Evidence and limits

The original gist is labeled Secret and Last active June 20 with two revisions; that is not evidence of its first public availability. The August CNA publication is the earliest verified public reference in this review and supplies the qualified disclosure/source date. The CNA quotes a maintainer response describing unsupported code; project lifecycle was not independently established. SSH persistence is an illustrative consequence, not a confirmed victim event. Suggested startsWith fix is not independently validated and can mishandle path-prefix boundaries; do not publish it as a released correction. Severity is VulDB CNA CVSS 4.0, not an independent reassessment. AgentLens references this report as part of its research corpus; that does not make it a separate victim incident.

Related records can include laboratory demonstrations; a relationship does not itself establish exploitation.

Sources