CVE-2026-41386 Overview
CVE-2026-41386 is a privilege escalation vulnerability in OpenClaw versions prior to 2026.3.22. The vulnerability exists because bootstrap setup codes are not properly bound to intended device roles and scopes during the pairing process. This allows attackers to exploit the first-use device pairing mechanism to escalate privileges beyond their intended role and scope, potentially gaining unauthorized access to system functions and data.
Critical Impact
Attackers can exploit unbound bootstrap setup codes during device pairing to escalate privileges, gaining unauthorized access beyond their intended role and scope.
Affected Products
- OpenClaw versions prior to 2026.3.22
Discovery Timeline
- 2026-04-28 - CVE-2026-41386 published to NVD
- 2026-04-28 - Last updated in NVD database
Technical Details for CVE-2026-41386
Vulnerability Analysis
This vulnerability is classified under CWE-648 (Incorrect Use of Privileged APIs). The core issue lies in the device pairing bootstrap process where setup codes lack proper binding to specific device roles and authorization scopes. When a device initiates the first-use pairing sequence, the authentication mechanism fails to validate or enforce role constraints, allowing an attacker to claim elevated privileges.
The network-accessible attack vector means that exploitation can occur remotely during the device pairing window. The successful exploitation results in high confidentiality and integrity impact, as attackers can access sensitive data and modify system configurations beyond their authorized scope.
Root Cause
The root cause is the absence of role and scope binding for bootstrap setup codes in the device pairing workflow. Prior to the patch, the device-pair extension and device-bootstrap infrastructure did not define or enforce role constraints such as SETUP_CODE_ROLES or scope limitations during the pairing process. This oversight allowed any device completing the pairing process to assume roles and scopes that were not explicitly authorized.
Attack Vector
The attack is network-based and targets the device pairing process during first-use initialization. An attacker positioned to interact with the OpenClaw pairing endpoint can:
- Intercept or initiate a device pairing request
- Exploit the unbound setup code to specify elevated roles
- Complete pairing with privileges beyond intended authorization
- Access restricted functionality and data using the escalated privileges
The security patch introduces proper role and scope binding as shown in the following code changes:
const DEFAULT_GATEWAY_PORT = 18789;
+const SETUP_CODE_ROLES = ["node"] as const;
+const SETUP_CODE_SCOPES: string[] = [];
type DevicePairPluginConfig = {
publicUrl?: string;
Source: GitHub Commit Update
The patch also adds scope normalization to the bootstrap process:
import path from "node:path";
+import { normalizeDeviceAuthScopes } from "../shared/device-auth.js";
import { resolvePairingPaths } from "./pairing-files.js";
import {
createAsyncLock,
Source: GitHub Commit Update
Detection Methods for CVE-2026-41386
Indicators of Compromise
- Devices paired with elevated roles (e.g., non-"node" roles) that were not explicitly authorized
- Unusual access patterns from recently paired devices attempting to access privileged APIs
- Device authentication logs showing scope assignments inconsistent with expected configurations
Detection Strategies
- Monitor device pairing events for anomalous role assignments during bootstrap
- Audit device authentication records to identify scope assignments that deviate from the "node" profile
- Implement logging for all device-bootstrap and device-pair operations to capture role and scope values
Monitoring Recommendations
- Enable verbose logging in the extensions/device-pair/ module to capture pairing requests and role assignments
- Set up alerts for devices attempting to access APIs outside their expected scope
- Review recent device pairings if running vulnerable versions to identify potential exploitation
How to Mitigate CVE-2026-41386
Immediate Actions Required
- Upgrade OpenClaw to version 2026.3.22 or later immediately
- Audit all devices paired while running vulnerable versions for unexpected role or scope assignments
- Consider re-pairing devices from vulnerable installations to ensure proper role binding
Patch Information
The vulnerability is addressed in OpenClaw version 2026.3.22. The fix introduces constant definitions for SETUP_CODE_ROLES and SETUP_CODE_SCOPES to explicitly bind bootstrap setup codes to the "node" profile, and adds scope normalization via the normalizeDeviceAuthScopes function in the device bootstrap module.
For detailed patch information, see:
Workarounds
- Restrict network access to the device pairing endpoint to trusted networks only
- Disable device pairing functionality if not actively required
- Implement network-level controls to limit which systems can initiate pairing requests
# Example: Restrict pairing endpoint access via firewall
iptables -A INPUT -p tcp --dport 18789 -s 10.0.0.0/8 -j ACCEPT
iptables -A INPUT -p tcp --dport 18789 -j DROP
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

