Openclaw cli: OpenClaw hook transform path containment missed symlink-resolved escapes
Description
The OpenClaw CLI has a vulnerability in its webhook transform modules where path validation only uses lexical checks. This allows a symlink within the allowed transform directory to resolve outside the intended directory, enabling dynamic import of unintended JavaScript code. The issue affects versions up to and including 2026.2.21-2 and is planned to be fixed in version 2026.2.22. Exploitation requires that hook transforms are enabled and reachable, and that an attacker can influence the transform path resolution to reference a symlink escape to attacker-controlled code. The vulnerability could lead to execution of unauthorized code with gateway-process privileges.
CVSS v4.0
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
OpenClaw CLI's webhook transform modules perform only lexical path validation, which can be bypassed by symlinks that resolve outside the trusted transform directory. This allows an attacker who can influence transform path resolution and place symlinks to attacker-controlled code to cause the gateway to dynamically import and execute unintended JavaScript code with elevated privileges. The vulnerability affects openclaw versions <= 2026.2.21-2. The planned fix in version 2026.2.22 enforces realpath-aware containment checks before dynamic import, while retaining lexical checks for traversal and absolute path escapes. Additional regression tests will cover symlink escape rejection and allowed in-root symlink cases.
Potential Impact
If exploited, an attacker could cause the gateway to import and execute arbitrary JavaScript code with gateway-process privileges by leveraging symlink path escapes in webhook transform modules. This could lead to unauthorized code execution within the gateway process. Exploitation requires specific conditions including enabled hook transforms, attacker control over transform path resolution, and presence of symlink escapes to attacker-controlled code.
Mitigation Recommendations
A patch is available and planned for release in version 2026.2.22 that enforces realpath-aware containment checks to prevent symlink escapes before dynamic import. Users should upgrade to this fixed version once released. Until then, ensure that hook transforms are not exposed to attacker-controlled paths or writable filesystem locations that could be used to create symlink escapes. The fix includes regression coverage for symlink escape rejection and allowed symlink cases within the root directory.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- BREW-openclaw-cli-GHSA-659f-22xc-98f2
- Osv Schema Version
- 1.7.3
- Ecosystems
- ["Homebrew"]
- Cvss Version
- 4.0
Threat ID: 6ac2458812601ec6a31640a5
Added to database: 10/04/2026, 12:24:40 UTC
Last enriched: 10/04/2026, 12:33:27 UTC
Last updated: 10/04/2026, 12:33:27 UTC
Views: 1
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.