CVE-2026-28456: OpenClaw affected by potential code execution via unsafe hook module path handling in Gateway
OpenClaw Gateway passed configured hook transform module paths to dynamic `import()` without confining them. Someone who can change gateway configuration could make the Gateway's Node.js process load and run an unintended local module. Versions from 2026.1.5 through 2026.2.13 are affected. Upgrade to 2026.2.14.
Published Feb 18, 2026 · Updated Mar 6, 2026 · Analysis Oct 31, 2026
What an attacker can do
Hook mappings can name a JavaScript or TypeScript transform module. In affected versions, hooks.mappings[].transform.module and hooks.internal.handlers[].module were not constrained to a safe directory before the gateway called import() on them (CWE-22, CWE-427). A relative path with .. or an absolute path could therefore point at any module the process can read.
The attacker needs a way to change gateway configuration, for example through the gateway config endpoints. The advisory says to treat that access as high privilege, and the CVSS vector requires high privileges. With it, the attacker points a hook at a module they control, such as a file written earlier, and the gateway loads and runs it inside its own Node.js process.
That gives code execution with the gateway's rights, so tokens, channel credentials and the host files the gateway can read are exposed. This turns config-write access into code execution, which matters most where config endpoints are reachable by operators or services that should not have shell access.
Who is affected
The npm package openclaw from 2026.1.5 up to and including 2026.2.13. Check the version and the two config keys:
npm ls -g openclaw
grep -nE 'transform|module' ~/.openclaw/openclaw.jsonThe config path may differ in your install. Review hooks.mappings[].transform.module and hooks.internal.handlers[].module for paths outside your hooks directory.
openclaw
- Ecosystem
- npm
- Affected
- >= 2026.1.5, < 2026.2.14
- Fixed in
- 2026.2.14
- Check
npm ls openclaw
How to fix it
Upgrade to 2026.2.14, the patched version (commits a0361b8 and 35c0e66):
npm install -g [email protected]Transform modules must now sit under ~/.openclaw/hooks/transforms. Paths that escape it, relative or absolute, are rejected with a "must be within" error, and transformsDir must also stay inside that root. Existing configs that point at other directories will need to move their modules. The advisory also advises not exposing gateway configuration endpoints to untrusted networks.
How to tell if you were hit
Review the two config values above for absolute paths, .. segments or modules outside ~/.openclaw/hooks/transforms. Check recent config writes through the gateway config endpoints in access logs. On the host, look for unexpected .js or .mjs files that a hook could reference, and for child processes spawned by the gateway Node.js process. Beam logs agent shell commands, which helps only if an agent wrote the module.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
OpenClaw Gateway supports hook mappings with optional JavaScript/TypeScript transform modules. In affected versions, the gateway did not sufficiently constrain configured module paths before passing them to dynamic import(). Under some configurations, a user who can modify gateway configuration could cause the gateway process to load and execute an unintended local module.
Impact
Potential code execution in the OpenClaw gateway Node.js process.
This requires access that can modify gateway configuration (for example via the gateway config endpoints). Treat such access as high privilege.
Affected Packages / Versions
- npm package:
openclaw - Affected:
>= 2026.1.5and<= 2026.2.13
Patched Versions
>= 2026.2.14
Fix Commit(s)
a0361b8ba959e8506dc79d638b6e6a00d12887e4(restrict hook transform module loading)35c0e66ed057f1a9f7ad2515fdcef516bd6584ce(harden hooks module loading)
Mitigation
- Upgrade to
2026.2.14or newer. - Avoid exposing gateway configuration endpoints to untrusted networks.
- Review config for unsafe values:
hooks.mappings[].transform.modulehooks.internal.handlers[].module
Thanks @222n5 for reporting.
Credited to 222n5.
Questions
- Who can exploit CVE-2026-28456?
A user who can modify gateway configuration, for example via the gateway config endpoints. The advisory says to treat that as high privilege.
- What does the attacker get?
Code execution in the OpenClaw gateway Node.js process.
- Which versions are affected?
2026.1.5 through 2026.2.13. Upgrade to 2026.2.14 or newer.
- Will the upgrade break my hook config?
It can. Modules outside
~/.openclaw/hooks/transformsare now rejected, so move them there and use paths relative to that directory, such asmodule: "gmail.js".
References
Read for this analysis:
- https://github.com/openclaw/openclaw/security/advisories/GHSA-v6c6-vqqg-w888
- https://github.com/openclaw/openclaw/commit/a0361b8ba959e8506dc79d638b6e6a00d12887e4
- https://github.com/openclaw/openclaw/commit/35c0e66ed057f1a9f7ad2515fdcef516bd6584ce
- https://github.com/openclaw/openclaw/releases/tag/v2026.2.14
- https://nvd.nist.gov/vuln/detail/CVE-2026-28456
- https://www.vulncheck.com/advisories/openclaw-arbitrary-code-execution-via-unsafe-hook-module-path-handling
- https://github.com/advisories/GHSA-v6c6-vqqg-w888
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
