OpenClaw Hook Session Key Override Enables Targeted Cross-Session Routing
Summary
The issue is not deterministic session keys by itself. The exploitable path was accepting externally supplied sessionKey values on authenticated hook ingress, allowing a hook token holder to route messages into chosen sessions.
Affected Behavior
POST /hooks/agentaccepted payloadsessionKeyand used it directly for session routing.- Common session-key shapes (for example
agent:main:dm:<peerId>) were often derivable from known metadata, making targeted routing practical when request-level override was enabled.
Attack Preconditions
- Attacker can call hook endpoints with a valid hook token.
- Hook ingress allows request-selected
sessionKeyvalues. - Target session keys can be derived or guessed.
Without those preconditions, deterministic key formats alone do not provide access.
Impact
- Integrity: targeted message/prompt injection into chosen sessions.
- Persistence: poisoned context can affect subsequent turns when the same session key is reused.
- Confidentiality impact is secondary and depends on additional weaknesses.
Affected Versions
openclaw>= 2.0.0-beta3and< 2026.2.12
Patched Versions
openclaw>= 2026.2.12
Fix
OpenClaw now uses secure defaults for hook session routing:
POST /hooks/agentrejects payloadsessionKeyunlesshooks.allowRequestSessionKey=true.- Added
hooks.defaultSessionKeyfor fixed ingress routing. - Added
hooks.allowedSessionKeyPrefixesto constrain explicit routing keys. - Security audit warns on unsafe hook session-routing settings.
Recommended Configuration
{
"hooks": {
"enabled": true,
"token": "${OPENCLAW_HOOKS_TOKEN}",
"defaultSessionKey": "hook:ingress",
"allowRequestSessionKey": false,
"allowedSessionKeyPrefixes": ["hook:"]
}
}
Credit
Thanks @alpernae for responsible reporting.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | openclaw | >= 2.0.0-beta3, < 2026.2.12 | 2026.2.12 |
References
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:N- Weakness (CWE)
CWE-330, CWE-639- Platform
- npm
- Package
openclaw- Disclosed
- 17.02.2026
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-hv93-r4j3-q65f - CC BY 4.0
Vulnerability history: openclaw
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 589
- First → latest
- 02.2026 10.2026
- Without a fix
- 9
- Exploited in attacks
- 0
Severity breakdown
- Critical 20
- High 215
- Medium 300
- Low 54
Disclosures per year
- 2026: 589
-
OpenClaw Hook Session Key Override Enables Targeted Cross-Session Routing this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.