Mar 3, 2026·5 min read·14 visits
OpenClaw versions prior to 2026.3.2 contain a logic flaw in the gateway's request path canonicalization. By using deeply nested URL encoding, an attacker can mask protected routes from the security filter while the downstream router correctly resolves them, granting unauthenticated access to internal APIs.
A path-based authentication bypass vulnerability exists in the OpenClaw AI Gateway due to insufficient URL decoding depth. Attackers can bypass the Policy Enforcement Point (PEP) by using multi-encoded path separators (e.g., %252f), allowing unauthorized access to sensitive plugin routes.
The OpenClaw AI infrastructure utilizes a centralized gateway acting as a Policy Enforcement Point (PEP). This component is responsible for intercepting incoming HTTP requests and enforcing authentication on protected routes, specifically those prefixed with /api/channels. The security model relies on comparing the incoming request path against a list of known protected prefixes.
However, the mechanism for normalizing these paths prior to inspection was insufficient. The gateway employed a shallow decoding strategy with a fixed limit on decoding passes. This created a discrepancy between how the security layer viewed the request path and how the internal plugin router interpreted it—a vulnerability class known as "Path Impedance Mismatch" (CWE-436).
Consequently, attackers can craft HTTP requests with multi-encoded characters (such as %25252f for /) that evade the gateway's blocklist but successfully resolve to sensitive endpoints within the application's routing logic. This effectively bypasses authentication for affected plugins.
The vulnerability arises from two distinct architectural flaws: bounded shallow canonicalization and implicit route registration.
First, the gateway's canonicalizePathForSecurity function enforced a hard limit of 3 decoding passes (MAX_PATH_DECODE_PASSES = 3). The intent was likely to prevent Denial of Service (DoS) via infinite decoding loops. However, this limit was too low. If an attacker encoded a slash character four times (e.g., %2525252f), the gateway would decode it three times, resulting in a string containing %2f. Since %2f is not a literal slash /, the prefix check path.startsWith("/api/channels") would fail, and the gateway would forward the request as "public" traffic.
Second, the plugin architecture utilized a generic api.registerHttpHandler() method. This method registered broad catch-all handlers without explicit authentication metadata. The internal router, typically using a robust framework-level decoder, would continue decoding the path until resolution, eventually interpreting the lingering %2f as a valid directory separator. This alignment failure allowed the request to reach the handler code, which assumed authentication had already been performed by the gateway.
The remediation strategy involved shifting from a shallow decode to a bounded fixpoint strategy with fail-closed logic. Below is a conceptual representation of the vulnerability and the fix.
// Pre-fix: Limited passes allowed evasion
const MAX_PATH_DECODE_PASSES = 3;
function canonicalizePathForSecurity(path) {
let decoded = path;
for (let i = 0; i < MAX_PATH_DECODE_PASSES; i++) {
const next = decodeURIComponent(decoded);
if (next === decoded) break;
decoded = next;
}
// If attacker used 4x encoding, 'decoded' still contains encoded chars
// and might not match the protected prefix.
return decoded;
}// Post-fix: Deep decode with anomaly detection
const MAX_PATH_DECODE_PASSES = 32;
function canonicalizePathForSecurity(path) {
let decoded = path;
let i = 0;
while (i < MAX_PATH_DECODE_PASSES) {
const next = decodeURIComponent(decoded);
if (next === decoded) return decoded; // Stable
decoded = next;
i++;
}
// FIX: If we hit the limit, assume malicious intent (Fail-Closed)
throw new SecurityAnomaly("Path canonicalization depth exceeded");
}
// Additional check: If result still looks encoded, treat as suspicious
if (decoded.includes("%")) {
requireFullAuthentication();
}The fix increases the decode limit significantly and, crucially, treats the exhaustion of this limit or the presence of residual encoded artifacts as a security anomaly, forcing a default-deny or full-auth state.
To exploit this vulnerability, an attacker targets a specific endpoint known to require authentication, such as the configuration profile for a messaging channel.
Target: /api/channels/nostr/default/profile
Attack Vector:
/api%25252fchannels%25252fnostr.%2f (encoded slash)./api/channels. It does not, because the string is literally /api%2fchannels./api%2fchannels... and decodes it fully to /api/channels/nostr.This grants the attacker read/write access to the channel configuration depending on the HTTP method used.
This vulnerability represents a significant security lapse for deployments exposing the OpenClaw gateway to untrusted networks. The primary impact is Authentication Bypass, allowing unauthorized interaction with internal plugins.
Confidentiality: Attackers can access private channel data, chat history (via plugins like BlueBubbles or Zalo), and system configuration profiles.
Integrity: If the protected endpoints support state-changing operations (POST/PUT/DELETE), an attacker could modify channel settings, inject malicious configuration, or disrupt service operations.
Availability: While primarily an access control issue, the "Service Shadowing" effect mentioned in the advisory could allow malicious plugins to hijack routes intended for legitimate services, leading to denial of service for specific features.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
OpenClaw OpenClaw | < 2026.3.2 | 2026.3.2 |
| Attribute | Detail |
|---|---|
| CWE | CWE-436 (Interpretation Conflict) |
| Attack Vector | Network (Remote) |
| Impact | Authentication Bypass |
| Severity | Moderate |
| Status | Patched |
| Exploitability | High (Low Complexity) |
Interpretation Conflict
A technical evaluation of the Crawl4AI open-source web crawling and scraping library revealed a high-severity credential exfiltration vulnerability in its self-hosted Dockerized API server. The flaw arises from an unvalidated base_url parameter in request payloads and a dynamic prefix resolution mechanism that retrieves system environment variables. Unauthenticated remote attackers can leverage these features in tandem to extract host-level secrets or redirect configured LLM API keys to an external listener under their control.
The Crawl4AI Docker API server, in versions 0.8.6 and prior, contains multiple critical vulnerabilities including improper path sanitization, missing authentication on administration routes, hardcoded JWT secrets, and SSRF. These vulnerabilities allow remote, unauthenticated attackers to write arbitrary files, execute arbitrary code, and pivot into private cloud environments.
A local security vulnerability in the Nuxt development server (nuxt dev) allows local unprivileged users to access sensitive configuration files and source code. On Linux environments running Node.js 20+, Nuxt bound its internal vite-node IPC server to an abstract-namespace Unix socket without any peer authentication, enabling co-resident local users to connect and request module code directly.
Mozilla Bleach is an open-source HTML sanitizing library for Python. Versions up to and including 6.3.0 contain an incomplete filtering implementation in the URI validation logic ('sanitize_uri_value'). This logic fails to detect disallowed protocols, such as 'javascript:', if they contain Unicode invisible characters, whitespace characters, or characters with a code point greater than U+00A0. While standard-compliant web browsers do not directly execute invalid URI schemes containing these non-standard characters, downstream systems that normalize Unicode text by stripping invisible or non-ASCII characters can unintentionally reactivate the 'javascript:' prefix, causing Cross-Site Scripting (XSS). Additionally, this behavior violates Bleach's core sanitization contract by outputting URIs that bypass protocol allowlists configured by the caller.
An uncontrolled resource consumption vulnerability exists in the Python package Bleach when parsing text to linkify email addresses. When `parse_email=True` is enabled, the regular expression engine is forced into a quadratic-time complexity scan on specially crafted payloads lacking an '@' symbol. This causes immediate CPU exhaustion and blocks application server worker processes.
A path traversal and sandbox escape vulnerability in LangChain and LangChain-Anthropic Python packages allows unauthenticated local attackers to access files outside the restricted directory via crafted input, symbolic links, or prefix bypasses.