CVE-2026-28393: OpenClaw's hook transform module path allows traversal and arbitrary JavaScript module loading
OpenClaw's `hooks.mappings[].transform.module` setting accepted absolute paths and `..` traversal, so a hook could load any JavaScript module on disk into the gateway process. An attacker who can change the hooks config gets code execution with the gateway's privileges. Versions 2.0.0-beta3 through 2026.2.13 are affected. Upgrade to 2026.2.14.
Published Mar 3, 2026 · Updated Mar 6, 2026 · Analysis Oct 31, 2026
What an attacker can do
During webhook processing, OpenClaw dynamically imports the file named in hooks.mappings[].transform.module and runs it. Path resolution accepted absolute paths and did not enforce containment for relative ones, so the module could resolve outside the intended transforms directory (CWE-22, CWE-427).
The attack has two steps. The attacker first needs write access to the OpenClaw config, or a way to update hooks config through an authenticated configuration mechanism. They also need an ESM module on disk at the target path. Then they call the hook endpoint with the correct hook token, and the module runs in the gateway process.
The CVSS vectors show high privileges required and local access, which matches that precondition. The result is code execution as the gateway user, which exposes the secrets the gateway holds, such as channel tokens and API keys, and everything that user can read or write. It is mainly a privilege-escalation or persistence step for someone who already has limited config access, for example through a shared config template or a lower-privileged admin role.
Who is affected
The openclaw npm package from 2.0.0-beta3 up to and including 2026.2.13. Check with:
npm ls -g openclawThen review hooks.mappings in your config for transform.module values that are absolute or contain .., and for a custom hooks.transformsDir.
openclaw
- Ecosystem
- npm
- Affected
- >= 2.0.0-beta3, <= 2026.2.13
- Fixed in
- 2026.2.14
- Check
npm ls openclaw
How to fix it
Upgrade to openclaw 2026.2.14:
npm install -g [email protected]The fix commits are a0361b8ba959e8506dc79d638b6e6a00d12887e4 and 18e8bd68c5015a894f999c6d5e6e32468965bfb5. Transform loading is now confined to ~/.openclaw/hooks/transforms. hooks.transformsDir must be inside that root, and transform.module must be inside the chosen transforms directory. Absolute paths outside and .. escapes are rejected.
How to tell if you were hit
Audit hooks.mappings[].transform.module and hooks.transformsDir for paths outside ~/.openclaw/hooks/transforms. Check config file modification times and who changed them. Look for unexpected .js or .mjs files in locations a hook points at, and for unexpected child processes or network connections from the gateway process. The advisory names no log line.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
OpenClaw hook mapping transforms could be loaded via absolute paths or .. traversal, allowing arbitrary JavaScript module loading/execution in the gateway process when an attacker can modify hooks configuration.
Affected Versions
- Affected: >= 2.0.0-beta3 and <= 2026.2.13
- Fixed: 2026.2.14
Details
hooks.mappings[].transform.module is dynamically imported and executed during webhook processing. Path resolution previously accepted absolute paths and did not enforce containment for relative paths, so a config-controlled transform could resolve outside the intended transforms directory.
Impact
If an attacker can write the OpenClaw config (or otherwise update hooks config through authenticated configuration mechanisms), they could point a hook mapping transform at an arbitrary module on disk and execute code with the gateway process privileges.
Reproduction (config-controlled module load)
- Configure a hook mapping that points to a transform path that escapes the transforms directory (for example via
..traversal). - Place a malicious ESM module at the resolved location that executes arbitrary code in the gateway process.
- Trigger the hook endpoint with the correct hook token.
Fix
Transform loading is now constrained to the OpenClaw transforms root directory:
- Root:
~/.openclaw/hooks/transforms hooks.transformsDirmust be within that directorytransform.modulemust be within the selected transforms directory
Attempts to escape the root (absolute paths outside, .. traversal) are rejected.
Fix commit(s):
- a0361b8ba959e8506dc79d638b6e6a00d12887e4
- 18e8bd68c5015a894f999c6d5e6e32468965bfb5
Credits
OpenClaw thanks @akhmittra for reporting.
Credited to akhmittra.
Questions
- Can a remote attacker exploit CVE-2026-28393 without config access?
Not according to the advisory. The attacker must be able to write the OpenClaw config or update hooks config through an authenticated mechanism, and must also supply the hook token to trigger the endpoint.
- What is the allowed directory after the fix?
~/.openclaw/hooks/transforms. Bothhooks.transformsDirandtransform.modulemust stay inside it.- Which versions are affected?
From 2.0.0-beta3 up to and including 2026.2.13. Version 2026.2.14 is fixed.
References
Read for this analysis:
- https://github.com/advisories/GHSA-7xhj-55q9-pc3m
- https://github.com/openclaw/openclaw/security/advisories/GHSA-7xhj-55q9-pc3m
- https://github.com/openclaw/openclaw/commit/18e8bd68c5015a894f999c6d5e6e32468965bfb5
- https://github.com/openclaw/openclaw/commit/a0361b8ba959e8506dc79d638b6e6a00d12887e4
- https://nvd.nist.gov/vuln/detail/CVE-2026-28393
- https://www.vulncheck.com/advisories/openclaw-beta-arbitrary-javascript-module-loading-via-hook-transform-path-traversal
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 entriesCVE-2026-62197
OpenClaw: Browser CDP discovery could accept blocked WebSocket URLs
medium8.5Oct 21, 2026CVE-2026-35630
OpenClaw: QQBot native approval buttons did not enforce configured approver identity
high8.0Jul 2, 2026CVE-2026-53806
OpenClaw: Combined POSIX shell options could confuse exec revalidation
high8.8Jul 2, 2026CVE-2026-53809
OpenClaw: Embedded runner policy could be confused by provider aliases
medium3.8Jul 2, 2026CVE-2026-53810
OpenClaw's marketplace runtime extension metadata could point at unscanned payloads
high8.8Jul 2, 2026CVE-2026-53811
OpenClaw: Matrix allowFrom could bind to mutable display names
high8.8Jul 2, 2026
