Mar 29, 2026·5 min read·28 visits
An authorization bypass in the openclaw npm package allows any user with a valid Bearer token to read session chat histories via the HTTP API, bypassing the strict `operator.read` scope requirements enforced on the equivalent WebSocket interface.
The OpenClaw Gateway HTTP API contains an incorrect authorization implementation that fails to enforce operator read scopes on the session history route. This flaw allows users with low-privileged authentication tokens to read sensitive chat transcripts that should be restricted to operators with explicit read permissions.
The openclaw package provides a Gateway component responsible for managing and routing chat session data. This component exposes functionality through two distinct transport protocols: WebSockets for real-time remote procedure calls (RPC) and standard HTTP REST endpoints for state retrieval.
The vulnerability, tracked as GHSA-5JVJ-HXMH-6H6J, exists within the HTTP implementation of the session history retrieval route. It is classified as CWE-863 (Incorrect Authorization). The system enforces strict scope-based access controls on the WebSocket interface but fails to replicate these checks on the equivalent HTTP endpoints.
This inconsistency creates an authorization bypass. An attacker possessing a valid authentication token with zero or restricted scopes can query the HTTP API directly to access protected resources. The system incorrectly validates the presence of the token without verifying the permissions associated with it.
The underlying flaw stems from an architectural divergence in how authorization policies are applied across different transport layers. The OpenClaw Gateway implements a scope-based access control model where specific operations require explicit scopes, such as the operator.read scope for accessing chat transcripts.
When a client requests the chat.history resource via the WebSocket interface, the Gateway routes the request through a centralized authorization handler. This handler inspects the operator's authenticated session, extracts the granted scopes, and validates them against the required operator.read policy before executing the function.
Conversely, the HTTP route handler for /sessions/:sessionKey/history implements a disparate authorization flow. The HTTP handler validates that a well-formed Bearer token is present in the Authorization header, confirming the user's identity. However, it omits the critical secondary step of checking whether the authenticated user possesses the operator.read scope necessary to read the requested session history.
Prior to the patch, the handleSessionHistoryHttpRequest function solely relied on a middleware layer that verified token authenticity. The explicit mapping between the HTTP endpoint and the required authorization scope was missing from the route definition.
Commit 1c45123231516fa50f8cf8522ba5ff2fb2ca7aea addresses this omission by explicitly synchronizing the HTTP authorization logic with the WebSocket RPC requirements. The patch introduces a new mechanism to resolve requested operator scopes from HTTP headers.
The developers implemented a new function, resolveGatewayRequestedOperatorScopes, which parses a newly introduced custom header, x-openclaw-scopes. The handleSessionHistoryHttpRequest function was then modified to invoke authorizeOperatorScopesForMethod("chat.history", requestedScopes) before processing the request.
// PATCHED: handleSessionHistoryHttpRequest (Conceptual abstraction based on commit 1c451232)
export async function handleSessionHistoryHttpRequest(req, res) {
// 1. Authenticate the token (Original logic)
const token = verifyBearerToken(req.headers.authorization);
// 2. Parse requested scopes from the new custom header (New logic)
const requestedScopes = resolveGatewayRequestedOperatorScopes(req.headers['x-openclaw-scopes']);
// 3. Explicitly verify the token holds the required scope for this method (New logic)
const isAuthorized = authorizeOperatorScopesForMethod("chat.history", requestedScopes, token);
if (!isAuthorized) {
return res.status(403).json({
ok: false,
error: { type: "forbidden", message: "missing scope: operator.read" }
});
}
// 4. Proceed with returning history
return res.status(200).json(getHistory(req.params.sessionKey));
}Exploiting this authorization bypass requires two prerequisites. The attacker must possess network connectivity to the OpenClaw Gateway HTTP API, and they must hold a valid Bearer token issued by the system. The token does not require any specific administrative scopes.
The attack is executed by formulating a standard HTTP GET request directed at the /sessions/:sessionKey/history endpoint. The attacker bypasses the secure WebSocket interface entirely, capitalizing on the missing scope enforcement in the REST handler.
The resulting payload is straightforward. The attacker passes their low-privileged token in the Authorization header and requests a target session key. The server responds with a 200 OK status and the complete JSON transcript of the requested chat session.
GET /sessions/agent:main:main/history HTTP/1.1
Host: gateway.openclaw.internal
Authorization: Bearer <VALID_LOW_PRIV_TOKEN>
Accept: application/jsonThe primary impact of this vulnerability is a breach of data confidentiality. Chat transcripts often contain sensitive information, including personally identifiable information (PII), proprietary business logic, or operational credentials shared during support sessions.
The vulnerability enables horizontal privilege escalation. A compromised low-privilege account, such as a basic user or a restricted integration bot, can view the interaction history of other users and administrators within the system.
The scope of the exposure is bounded by the nature of the endpoint. The flaw permits unauthorized read access to historical data but does not grant arbitrary write capabilities, system configuration modification, or remote code execution. The integrity and availability of the gateway service remain unaffected.
The definitive remediation strategy is to upgrade the openclaw package to version 2026.3.25 or later. This release contains the complete patch that enforces the operator.read scope on the HTTP session history route.
Deploying the patch necessitates configuration changes for client applications interacting with the HTTP API. Clients must be updated to include the new x-openclaw-scopes custom header in their requests; failure to do so will result in legitimate requests being rejected with a 403 Forbidden error.
Development teams maintaining applications built on OpenClaw should conduct a systematic review of all dual-transport routes. Any endpoint accessible via both WebSocket and HTTP must be audited to ensure authorization policies are applied uniformly across both interfaces.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
openclaw OpenClaw | <= 2026.3.24 | 2026.3.25 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-863 |
| Attack Vector | Network (HTTP) |
| Authentication Required | Yes (Low Privilege) |
| Impact | Confidentiality (High) |
| Exploit Status | Proof-of-Concept Available |
| CVSSv3 Score | 5.3 |
The software performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.
CVE-2026-48861 is a client-side HTTP request-line CRLF (Carriage Return Line Feed) injection vulnerability in the popular Elixir HTTP client library, Mint. The vulnerability permits HTTP Request Splitting and HTTP Request Smuggling when an application forwards untrusted, attacker-controlled inputs to Mint's HTTP client requests as either the HTTP request method or target. By embedding CRLF characters within these parameters, an attacker can terminate the request line prematurely, inject malicious headers, or pipeline entirely independent requests. These smuggled requests are then processed by upstream or downstream proxy servers as separate HTTP queries on the same TCP connection. While Mint version 1.7.0 introduced target validation to secure the request target, the HTTP request method parameter remained completely unvalidated. This flaw allows attackers to bypass routing filters, access restricted internal APIs, or poison HTTP caches under default configurations.
An Inconsistent Interpretation of HTTP Requests (HTTP Request/Response Smuggling) vulnerability in the Elixir Mint HTTP client allows attacker-controlled HTTP/1 servers to desynchronize response framing on shared connections due to over-lenient parsing of sign-prefixed Content-Length headers.
An allocation of resources without limits or throttling vulnerability in Elixir Mint allows an attacker-controlled HTTP/2 server to exhaust memory in a Mint client. The vulnerability is exploited by sending a HEADERS frame without the END_HEADERS flag followed by an infinite stream of CONTINUATION frames. Because the client lacks limits on the incoming header-block accumulator, the client continuously consumes memory until an out-of-memory crash occurs.
CVE-2026-48596 is an Improper Neutralization of CRLF Sequences in HTTP Headers (HTTP Request/Response Splitting, CWE-113) in the Elixir Tesla HTTP client. The flaw resides in how multipart content-type parameters are joined and serialized, enabling attackers to inject arbitrary headers or split HTTP requests when applications pass untrusted inputs to the parameters of multipart uploads.
An improper handling of highly compressed data (decompression bomb) vulnerability exists in the Elixir Tesla HTTP client when utilizing response decompression middlewares. By serving highly compressed responses or stacked content-encoding headers, a malicious server can cause arbitrary heap exhaustion, leading to a denial of service (DoS) crash in the BEAM virtual machine.
A high-severity security vulnerability in Elixir's Tesla HTTP client library (CVE-2026-48595) allows unauthenticated remote attackers to harvest sensitive credentials, including Authorization headers and cookies. The flaw resides in the 'Tesla.Middleware.FollowRedirects' component, which performs case-sensitive lookups when stripping credentials during cross-origin redirects. Because HTTP headers are case-insensitive by RFC specifications, standard canonical casing (e.g., 'Authorization') bypasses the lowercase-only blocklist, leaking tokens to untrusted external redirect destinations.