NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · OpenClaw

CVE-2026-32060: OpenClaw has a path traversal in apply_patch could write/delete files outside the workspace

highCVSS 4.0 8.7 · 3.1 8.8GHSA-r5fq-947m-xm57

OpenClaw's `apply_patch` tool did not enforce workspace containment when the agent ran without filesystem sandboxing. Paths like `../../` or absolute paths let it write or delete files outside the workspace. Versions before 2026.2.14 are affected; upgrade to 2026.2.14.

Published Feb 19, 2026 · Updated Mar 11, 2026 · Analysis Oct 31, 2026

What an attacker can do

apply_patch lets the agent edit files by applying a patch. In non-sandbox mode, the path resolution did not check that the target stayed inside the configured workspace directory. A patch naming ../../some/file or an absolute path wrote or deleted that file wherever the OpenClaw process had permission.

The conditions are apply_patch enabled and no filesystem sandbox. The advisory says practical impact depends on who can trigger tool execution. It matters most when less-trusted callers can invoke tools, or when operators believed edits were confined to the workspace. A prompt injection in content the agent reads could also steer the agent into issuing such a patch, though the advisory does not describe that route.

The result is arbitrary file write and delete as the OpenClaw user. That can mean overwriting shell startup files, SSH keys or config to get code execution, or deleting data. The 3.1 vector rates confidentiality, integrity and availability all high with low privileges.

Who is affected

The openclaw npm package before 2026.2.14 is affected when apply_patch is enabled (tools.exec.applyPatch.enabled) and the agent runs without filesystem sandbox containment. Check the installed version:

npm ls openclaw

Also check whether tools.exec.applyPatch.workspaceOnly is set to false, because that setting deliberately opts out of containment and can bring the behaviour back on fixed versions.

openclaw

Ecosystem
npm
Affected
< 2026.2.14
Fixed in
2026.2.14
Check
npm ls openclaw

How to fix it

Upgrade to openclaw 2026.2.14 or later.

npm install [email protected]

Workarounds from the advisory: keep tools.exec.applyPatch.enabled off if you do not need apply_patch, keep tools.exec.applyPatch.workspaceOnly at its secure default of true, and restrict who can trigger tool execution and which tools are allowlisted.

How to tell if you were hit

Review recent patches applied by the agent for paths containing .. or starting with / that point outside the workspace. Check for modified or missing files in sensitive locations such as the home directory, shell profiles and ~/.ssh. Beam records agent file access and flags risky operations with its rules, which can surface writes outside the project directory.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

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

  • PR: https://github.com/openclaw/openclaw/pull/16405
  • Merge commit: 5544646a09c0121fca7d7093812dc2de8437c7f1

Credits

Thanks to @p80n-sec for reporting this issue.

Credited to p80n-sec.

Questions

Am I affected if I use the sandbox?

The advisory describes the flaw in the non-sandbox path resolution. The affected case is apply_patch enabled with the agent running without filesystem sandbox containment.

What does workspaceOnly: false do?

It intentionally opts out of workspace containment and can re-enable writes and deletes outside the workspace, even on patched versions. Leave it at true.

Is CVE-2026-32060 exploited in the wild?

No source reports exploitation, and it is not in CISA's KEV catalog.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More OpenClaw vulnerabilities

All OpenClaw entries