CVE-2026-41399: OpenClaw: Gateway WebSocket Denial of Service via unbounded pre-auth upgrades
The OpenClaw gateway accepted an unlimited number of concurrent unauthenticated WebSocket upgrades. An attacker with network access can open many sockets and starve legitimate clients of connections. OpenClaw 2026.3.24 and earlier is affected. Upgrade to 2026.3.28, which caps pre-auth upgrades per client IP.
Published Mar 31, 2026 · Updated Apr 28, 2026 · Analysis Oct 31, 2026
What an attacker can do
The gateway's HTTP server (src/gateway/server-http.ts) handled WebSocket upgrade requests before the client had authenticated. It did not limit how many of those half-open, unauthenticated connections could exist at once (CWE-770, CWE-400). Each one held a socket and some worker capacity.
An attacker who can reach the gateway port can open a large number of upgrades and never authenticate. Once the gateway's sockets and workers are consumed, real clients, such as operator consoles, paired devices and channel integrations, cannot connect or get dropped. The result is lost availability of WebSocket service. The advisory reports no data exposure or code execution. The CVSS 4.0 vector shows a low-privilege network attack with availability impact only, hence medium severity. A gateway exposed to the internet or to a large internal network is most at risk.
Who is affected
The openclaw npm package at 2026.3.24 and earlier, for any gateway whose WebSocket port is reachable by untrusted clients. Check the version:
npm ls openclaw
openclaw --versionA gateway bound only to loopback or a private, trusted segment faces less risk.
openclaw
- Ecosystem
- npm
- Affected
- <= 2026.3.24
- Fixed in
- 2026.3.28
- Check
npm ls openclaw
How to fix it
Upgrade to openclaw 2026.3.28 or later:
npm install -g [email protected]Commit cb5f7e201f ("gateway: cap concurrent pre-auth websocket upgrades") adds a pre-auth connection budget in src/gateway/server/preauth-connection-budget.ts, keyed by client IP, honoring the trustedProxies and allowRealIpFallback settings. When a client's budget is used up, the gateway answers 503 "Too many unauthenticated sockets" and destroys the socket. The slot is released on close and handed to the session after authentication. The advisory lists no workaround. Limit who can reach the gateway port at the firewall or reverse proxy in the meantime.
How to tell if you were hit
Look at connection counts on the gateway port: many ESTABLISHED sockets from one address with no authenticated session is the signature. Gateway and proxy logs will show a burst of WebSocket upgrade requests without a following connect or auth message. After the fix, a flood from one IP appears as 503 responses with "Too many unauthenticated sockets". Check:
ss -tn state established '( sport = :GATEWAY_PORT )' | wc -lReplace GATEWAY_PORT with the port your gateway listens on.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
The gateway accepted unbounded concurrent unauthenticated WebSocket upgrades before allocating them to an authenticated session budget.
Impact
An unauthenticated network attacker could consume socket and worker capacity and disrupt WebSocket availability for legitimate clients.
Affected Component
src/gateway/server-http.ts, src/gateway/server/preauth-connection-budget.ts
Fixed Versions
- Affected:
<= 2026.3.24 - Patched:
>= 2026.3.28 - Latest stable
2026.3.28contains the fix.
Fix
Fixed by commit cb5f7e201f (gateway: cap concurrent pre-auth websocket upgrades).
Discovered by:Topsec AlphaLab (wang dong)
Credited to topsec-bunney.
Questions
- Does CVE-2026-41399 require authentication?
No. The flaw is in the phase before authentication. The attacker only needs to reach the WebSocket endpoint and open many upgrades.
- Can it leak data or run code?
The advisory describes only loss of WebSocket availability through exhausted socket and worker capacity. It reports no confidentiality or integrity impact.
- How does the patched version limit it?
It caps concurrent unauthenticated upgrades per client IP and returns 503 once the cap is reached. If you use a reverse proxy, set trustedProxies correctly so the real client IP is used.
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
