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.
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.
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.
.. traversal).Transform loading is now constrained to the OpenClaw transforms root directory:
~/.openclaw/hooks/transformshooks.transformsDir must be within that directorytransform.module must be within the selected transforms directoryAttempts to escape the root (absolute paths outside, .. traversal) are rejected.
Fix commit(s):
OpenClaw thanks @akhmittra for reporting.
{
"github_reviewed": true,
"github_reviewed_at": "2026-03-03T18:09:54Z",
"cwe_ids": [
"CWE-22",
"CWE-427"
],
"severity": "HIGH",
"nvd_published_at": "2026-03-05T22:16:15Z"
}