NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · OpenClaw

CVE-2026-28393: OpenClaw's hook transform module path allows traversal and arbitrary JavaScript module loading

highCVSS 4.0 8.3 · 3.1 6.0GHSA-7xhj-55q9-pc3m

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 openclaw

Then 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)

  1. Configure a hook mapping that points to a transform path that escapes the transforms directory (for example via .. traversal).
  2. Place a malicious ESM module at the resolved location that executes arbitrary code in the gateway process.
  3. 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.transformsDir must be within that directory
  • transform.module must 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. Both hooks.transformsDir and transform.module must 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

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 entries