CVE-2026-22172: OpenClaw: WebSocket shared-auth connections could self-declare elevated scopes
The OpenClaw gateway WebSocket connect path, in versions up to and including 2026.3.11, let a client that logged in with the shared token or password and no device identity keep scopes it declared itself, such as operator.admin. That lets any holder of the shared secret run admin-only gateway operations. Fixed in openclaw 2026.3.12.
Published Mar 13, 2026 · Updated Mar 20, 2026 · Analysis Oct 31, 2026
What an attacker can do
In src/gateway/server/ws-connection/message-handler.ts, the device-less connect path calls clearUnboundScopes() to strip client-declared scopes that are not tied to a device. The guard contained a !sharedAuthOk exception, so connections authenticated by a shared token or password skipped the stripping. The client's own scopes list, for example ["operator.admin"] with no device, was then honored before method dispatch (CWE-269, CWE-862).
The attacker needs the gateway's shared token or password and network access to the WebSocket. That is the PR:L in the CVSS vector. Shared secrets are often handed to backend services, scripts and several people, so the holder is not always an administrator. With the flaw, any of them could escalate to admin-only gateway operations they were never granted.
The vector rates scope as changed and impact high on all three axes. Admin on the gateway can reach what the gateway controls, such as agents, channels, configuration and the tools those agents run. Gateways that use only device-bound auth were not on this path.
Who is affected
The npm package openclaw up to and including 2026.3.11, with the gateway reachable over WebSocket and shared-token or password authentication in use. Check the version:
npm ls openclaw
openclaw --versionIf several systems or people share one gateway secret, count them all as potential admins until you upgrade.
openclaw
- Ecosystem
- npm
- Affected
- <= 2026.3.11
- Fixed in
- 2026.3.12
- Check
npm ls openclaw
How to fix it
Upgrade to openclaw 2026.3.12:
npm install -g [email protected]The fix, pull request 44306, makes the gateway clear unbound scopes for non-Control-UI connections, including shared-auth ones. The final condition is if (!device && (!isControlUi || decision.kind !== "allow")), so allowed Control UI sessions keep their scopes. Regression tests cover a token-mode connect with operator.admin and no device, and the shared-password case. The sources give no workaround. After upgrading, rotate the shared token or password if untrusted parties held it.
How to tell if you were hit
Review gateway logs for WebSocket connections authenticated by the shared secret that then called admin-only methods. Look for connects with no device identity that declare operator.admin. Check for configuration changes, new paired devices or new agents you did not make. Fixed versions deny those calls.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
A logic flaw in the OpenClaw gateway WebSocket connect path allowed certain device-less shared-token or password-authenticated backend connections to keep client-declared scopes without server-side binding. A shared-authenticated client could present elevated scopes such as operator.admin even though those scopes were not tied to a device identity or an explicitly trusted Control UI path.
Impact
This crossed the intended authorization boundary and could let a shared-secret-authenticated backend client perform admin-only gateway operations.
Affected versions
openclaw <= 2026.3.11
Patch
Fixed in openclaw 2026.3.12. The gateway now clears unbound scopes for non-Control-UI shared-auth connections, and regression tests cover the device-less shared-auth path.
Credited to LUOYEcode.
Questions
- Is OpenClaw 2026.3.11 affected by CVE-2026-22172?
Yes. Versions up to and including 2026.3.11 are affected, and 2026.3.12 is the fixed release.
- Does the attacker need credentials?
Yes: the gateway's shared token or password. The flaw lets such a client raise its own scopes to operator.admin, which is why the privileges-required value is low.
- Why is it rated critical?
The CVSS 3.1 score is 9.9 because it is network-reachable, low complexity, changes scope and gives high confidentiality, integrity and availability impact, once a shared secret is held.
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 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
