
Cloud Vulnerability DB
A community-led vulnerabilities database
ZDI-CAN-29311: OpenClaw Canvas Authentication Bypass Vulnerability -- ABSTRACT ------------------------------------- Trend Micro's Zero Day Initiative has identified a vulnerability affecting the following products: OpenClaw - OpenClaw -- VULNERABILITY DETAILS ------------------------
The OpenClaw gateway's authorizeCanvasRequest() function implements an IP-based authentication fallback for canvas endpoints (/__openclaw__/a2ui/, /__openclaw__/canvas/, /__openclaw__/ws). When a WebSocket client authenticates from a private IP address, ALL subsequent HTTP requests from that same IP are granted canvas access without requiring their own authentication token.
In environments where multiple clients share a single IP address ��� corporate NAT, VPN concentrators, Kubernetes clusters, Docker host-mode networking ��� an unauthenticated attacker on the same network is granted full canvas access by virtue of sharing an IP with a legitimate authenticated client.
Three functions in src/gateway/server-http.ts create this vulnerability:
function hasAuthorizedWsClientForIp(clients: Set<GatewayWsClient>, clientIp: string): boolean {
for (const client of clients) {
if (client.clientIp && client.clientIp === clientIp) {
return true;
}
}
return false;
}This function checks if ANY connected WebSocket client shares the same IP. It does not verify that the HTTP request belongs to the same user, session, or browser as the WS client.
async function authorizeCanvasRequest(params: { ... }): Promise<GatewayAuthResult> {
// ... token check first ...
const clientIp = resolveGatewayClientIp({ ... });
// Only allow fallback for private/loopback addresses
if (!isPrivateOrLoopbackAddress(clientIp)) {
return lastAuthFailure ?? { ok: false, reason: "unauthorized" };
}
// THE VULNERABILITY: grants access based on IP alone
if (hasAuthorizedWsClientForIp(clients, clientIp)) {
return { ok: true };
}
return lastAuthFailure ?? { ok: false, reason: "unauthorized" };
}If the HTTP request comes from a private IP that matches any authenticated WS client, access is granted without verifying the request's own credentials.
function isCanvasPath(pathname: string): boolean {
return (
pathname === A2UI_PATH || // /__openclaw__/a2ui
pathname.startsWith(`${A2UI_PATH}/`) ||
pathname === CANVAS_HOST_PATH || // /__openclaw__/canvas
pathname.startsWith(`${CANVAS_HOST_PATH}/`) ||
pathname === CANVAS_WS_PATH // /__openclaw__/ws
);
}All canvas endpoints use this weaker authentication path instead of the standard authorizeGatewayConnect() which requires a valid token.
--bind lan and a token for authentication.10.0.0.1).10.0.0.1 to the gateway (NAT).http://gateway:18789/__openclaw__/a2ui/ with NO authentication header.authorizeCanvasRequest() checks: Is 10.0.0.1 a private IP? Yes. Is there a WS client from 10.0.0.1? Yes (Alice). Access granted.In containerized deployments using shared networking (host mode, pod networking), multiple containers share the same IP. One container's authentication enables canvas access for all containers on that IP.
openclaw:localcd vulnerabilities/04-canvas-ip-auth-bypass
docker compose up -d --waitpython3 poc.py| Test | Source | Source IP | Token | Result |
|---|---|---|---|---|
| 1 ��� Host (different IP) | Host machine | Host bridge IP | None | 401 Unauthorized |
| 2 ��� Host with token (control) | Host machine | Host bridge IP | Valid | 200 OK |
| 3 ��� Same IP (exploit) | docker exec into legit container | 172.28.0.20 | None | 200 OK |
poc.py uses docker exec to run an HTTP request from inside the legitimate client's container (IP 172.28.0.20) with no Authorization header. The gateway's authorizeCanvasRequest() matches the source IP against the authenticated WebSocket client and returns 200 OK ��� granting full canvas access without credentials.docker compose down -v--bind lan) and clients share IP addresses (NAT, VPN, K8s, corporate networks).c45f3c5b004c8d63dc0e282e2176f8c9355d24f1Source: NVD
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."