Executive brief
OpenClaw is a popular JavaScript archive extraction library. A race condition in its ZIP extraction logic allows an attacker to write files outside the intended extraction directory by rebinding parent-directory symlinks between validation and file write. This could enable an attacker to overwrite arbitrary files on the system where archives are extracted.
Technical details
The vulnerability is a Time-of-Check Time-of-Use (TOCTOU) race condition combined with improper symlink handling (CWE-367, CWE-59). In src/infra/archive.ts, ZIP extraction validates output paths but performs the actual file write in a separate step. Between validation and write, an attacker with local file system access can rebind a parent-directory symlink, causing the final write to be redirected outside the extraction root. The attack requires precise timing and local file system access. The fix hardens ZIP write operations by binding writes to opened file handle identity and avoiding the pre-write truncate race, verified through updated regression tests in archive.test.ts. Patch version 2026.3.2 is available.
Affected products
- OpenClaw openclaw <= 2026.3.1
CVE identifiers
- CVE-2026-27670
- CVE-2026-28483
Timeline
- 2026-03-03: disclosed
- 2026-03-02: patched: Patch version 2026.3.2 released