Skip to content

OpenClaw has a path traversal in apply_patch could write/delete files outside the workspace

High severity GitHub Reviewed Published Feb 19, 2026 in openclaw/openclaw • Updated Feb 19, 2026

Package

npm openclaw (npm)

Affected versions

< 2026.2.14

Patched versions

2026.2.14

Description

Summary

In affected versions, when apply_patch was enabled and the agent ran without filesystem sandbox containment, crafted paths could cause file writes/deletes outside the configured workspace directory.

Affected Packages / Versions

  • Package: openclaw (npm)
  • Affected: <= 2026.2.13
  • Fixed: >= 2026.2.14

Details

The non-sandbox path resolution in apply_patch did not enforce workspace containment. Inputs like ../../... or absolute paths could escape the working directory in non-sandboxed mode.

Impact

Practical impact depends on deployment and who can trigger tool execution. This is most relevant when tool invocation is exposed to less-trusted callers or when operators expected workspace-only containment.

Workarounds

  • Keep tools.exec.applyPatch.enabled disabled if you do not need apply_patch.
  • Keep tools.exec.applyPatch.workspaceOnly at its secure default of true.
  • Restrict who can trigger tool execution (and which tools are allowlisted).

Configuration Note

tools.exec.applyPatch.workspaceOnly: false intentionally opts out of workspace containment and can re-enable outside-workspace writes/deletes.

Fix

Credits

Thanks to @p80n-sec for reporting this issue.

References

@steipete steipete published to openclaw/openclaw Feb 19, 2026
Published to the GitHub Advisory Database Feb 19, 2026
Reviewed Feb 19, 2026
Last updated Feb 19, 2026

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

EPSS score

Weaknesses

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. Learn more on MITRE.

CVE ID

No known CVE

GHSA ID

GHSA-r5fq-947m-xm57

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.