{"id":"GHSA-r5fq-947m-xm57","summary":"OpenClaw has a path traversal in apply_patch could write/delete files outside the workspace","details":"## Summary\n\nIn 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.\n\n## Affected Packages / Versions\n\n- Package: `openclaw` (npm)\n- Affected: `\u003c= 2026.2.13`\n- Fixed: `\u003e= 2026.2.14`\n\n## Details\n\nThe 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.\n\n## Impact\n\nPractical 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.\n\n## Workarounds\n\n- Keep `tools.exec.applyPatch.enabled` disabled if you do not need `apply_patch`.\n- Keep `tools.exec.applyPatch.workspaceOnly` at its secure default of `true`.\n- Restrict who can trigger tool execution (and which tools are allowlisted).\n\n## Configuration Note\n\n`tools.exec.applyPatch.workspaceOnly: false` intentionally opts out of workspace containment and can re-enable outside-workspace writes/deletes.\n\n## Fix\n\n- PR: https://github.com/openclaw/openclaw/pull/16405\n- Merge commit: `5544646a09c0121fca7d7093812dc2de8437c7f1`\n\n## Credits\n\nThanks to @p80n-sec for reporting this issue.","aliases":["CVE-2026-32060"],"modified":"2026-03-13T10:56:25.112409Z","published":"2026-02-19T20:45:58Z","database_specific":{"github_reviewed_at":"2026-02-19T20:45:58Z","nvd_published_at":"2026-03-11T14:16:27Z","cwe_ids":["CWE-22"],"severity":"HIGH","github_reviewed":true},"references":[{"type":"WEB","url":"https://github.com/openclaw/openclaw/security/advisories/GHSA-r5fq-947m-xm57"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-32060"},{"type":"WEB","url":"https://github.com/openclaw/openclaw/pull/16405"},{"type":"WEB","url":"https://github.com/openclaw/openclaw/commit/5544646a09c0121fca7d7093812dc2de8437c7f1"},{"type":"PACKAGE","url":"https://github.com/openclaw/openclaw"},{"type":"WEB","url":"https://github.com/openclaw/openclaw/releases/tag/v2026.2.14"},{"type":"WEB","url":"https://www.vulncheck.com/advisories/openclaw-path-traversal-in-apply-patch-via-crafted-paths"}],"affected":[{"package":{"name":"openclaw","ecosystem":"npm","purl":"pkg:npm/openclaw"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2026.2.14"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/02/GHSA-r5fq-947m-xm57/GHSA-r5fq-947m-xm57.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"},{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X"}]}