{"id":"GHSA-x82f-27x3-q89c","aliases":[],"status":"published","title":"OpenClaw's TOCTOU symlink race in writeFileWithinRoot could create or truncate files outside root boundaries","description":"### Summary\nA symlink-retarget TOCTOU race in `writeFileWithinRoot` could point an attacker-controlled path alias outside the configured root between resolution and write operations.\n\n### Impact\nAffected versions could cause out-of-root write side effects (including file creation or truncation) before final boundary validation.\n\n### Fix\nRoot-scoped write flow now opens existing files without pre-truncation, creates missing files with exclusive create semantics, truncates only after post-open identity/boundary checks, and removes out-of-root artifacts when a race is detected.\n\n### Affected and Patched Versions\n- Affected: `\u003c= 2026.2.26`\n- Patched: `2026.3.1`","severity":{"version":"4.0","score":8.7,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","level":"high","from":"ghsa"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-367","CWE-59"],"published":"2026-03-02T21:55:25Z","modified":"2026-03-04T15:17:29Z","fixes":[{"ecosystem":"npm","package":"openclaw","fixed_in":["2026.3.1"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"openclaw","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2026.3.1"}]}]},{"source":"osv","ecosystem":"npm","package":"openclaw","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2026.3.1"}]}]}],"references":[{"url":"https://github.com/openclaw/openclaw/security/advisories/GHSA-x82f-27x3-q89c","tags":["web"]},{"url":"https://github.com/advisories/GHSA-x82f-27x3-q89c"},{"url":"https://github.com/openclaw/openclaw","tags":["package"]}],"sources":{"ghsa":[{"id":"GHSA-x82f-27x3-q89c","title":"OpenClaw's TOCTOU symlink race in writeFileWithinRoot could create or truncate files outside root boundaries","description":"### Summary\nA symlink-retarget TOCTOU race in `writeFileWithinRoot` could point an attacker-controlled path alias outside the configured root between resolution and write operations.\n\n### Impact\nAffected versions could cause out-of-root write side effects (including file creation or truncation) before final boundary validation.\n\n### Fix\nRoot-scoped write flow now opens existing files without pre-truncation, creates missing files with exclusive create semantics, truncates only after post-open identity/boundary checks, and removes out-of-root artifacts when a race is detected.\n\n### Affected and Patched Versions\n- Affected: `\u003c= 2026.2.26`\n- Patched: `2026.3.1`","status":"published","published":"2026-03-02T21:55:25Z","modified":"2026-03-02T21:55:26Z","cvss":[{"version":"4.0","score":8.7,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","level":"high"}],"cwes":["CWE-59","CWE-367"],"updated_at":"2026-11-02T14:39:30.031684Z"}],"osv":[{"id":"GHSA-x82f-27x3-q89c","title":"OpenClaw's TOCTOU symlink race in writeFileWithinRoot could create or truncate files outside root boundaries","description":"### Summary\nA symlink-retarget TOCTOU race in `writeFileWithinRoot` could point an attacker-controlled path alias outside the configured root between resolution and write operations.\n\n### Impact\nAffected versions could cause out-of-root write side effects (including file creation or truncation) before final boundary validation.\n\n### Fix\nRoot-scoped write flow now opens existing files without pre-truncation, creates missing files with exclusive create semantics, truncates only after post-open identity/boundary checks, and removes out-of-root artifacts when a race is detected.\n\n### Affected and Patched Versions\n- Affected: `\u003c= 2026.2.26`\n- Patched: `2026.3.1`","status":"published","published":"2026-03-02T21:55:25Z","modified":"2026-03-04T15:17:29.322934Z","cvss":[{"version":"4.0","score":8.7,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","level":"high"}],"cwes":["CWE-367","CWE-59"],"updated_at":"2026-11-02T15:46:59.835583Z"}]}}
