Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-41916

CVE-2026-41916: Openclaw Auth Bypass Vulnerability

CVE-2026-41916 is an authentication bypass flaw in Openclaw that exploits stale auth state after config reloads. Attackers can bypass authentication controls on gateway connections. Learn about affected versions and fixes.

Published:

CVE-2026-41916 Overview

OpenClaw before version 2026.4.8 contains an authentication state management vulnerability (CWE-613: Insufficient Session Expiration) where the resolvedAuth closure becomes stale after configuration reload. Newly accepted gateway connections continue using outdated resolved auth state, allowing attackers to bypass authentication controls through config reload operations.

Critical Impact

Attackers with low-level privileges can exploit stale authentication state to bypass authentication controls by triggering configuration reload operations, potentially gaining unauthorized access to protected resources.

Affected Products

  • OpenClaw versions prior to 2026.4.8
  • OpenClaw for Node.js (all versions before the security patch)

Discovery Timeline

  • 2026-04-28 - CVE-2026-41916 published to NVD
  • 2026-04-30 - Last updated in NVD database

Technical Details for CVE-2026-41916

Vulnerability Analysis

This vulnerability stems from improper session expiration handling in OpenClaw's authentication state management system. When the gateway configuration is reloaded, the resolvedAuth closure retains stale authentication state rather than being refreshed. This creates a race condition where new gateway connections inherit outdated authentication credentials and permissions, effectively allowing users to retain access rights that should have been revoked or modified during the configuration update.

The vulnerability is exploitable over the network but requires an attacker to have some level of prior authentication (low privileges) and depends on the timing of configuration reload operations. This authentication bypass could allow unauthorized access to resources that the attacker should no longer have permission to access after credential changes or permission modifications.

Root Cause

The root cause lies in the DNS pinning and dispatcher creation logic within src/infra/net/fetch-guard.ts. The original implementation resolved pinned hostname information before checking whether a trusted environment proxy was configured. This meant that even when using trusted proxy configurations, the system would retain stale resolved authentication state instead of properly refreshing it after configuration changes.

Attack Vector

The attack vector is network-based and requires the following conditions:

  1. The attacker must have low-level authenticated access to the OpenClaw system
  2. A configuration reload must occur (either triggered by the attacker or through normal operations)
  3. The attacker establishes new gateway connections after the reload while the stale auth state persists

By timing connection attempts around configuration reload events, an attacker can exploit the window where outdated authentication state remains active, bypassing authentication controls that should have been updated.

typescript
// Security patch from src/infra/net/fetch-guard.ts
// The fix moves DNS pinning resolution inside the conditional block to prevent stale auth state

     try {
       assertExplicitProxySupportsPinnedDns(parsedUrl, params.dispatcherPolicy, params.pinDns);
       await assertExplicitProxyAllowed(params.dispatcherPolicy, params.lookupFn, params.policy);
-      const pinned = await resolvePinnedHostnameWithPolicy(parsedUrl.hostname, {
-        lookupFn: params.lookupFn,
-        policy: params.policy,
-      });
       const canUseTrustedEnvProxy =
         mode === GUARDED_FETCH_MODE.TRUSTED_ENV_PROXY && hasProxyEnvConfigured();
       if (canUseTrustedEnvProxy) {
         dispatcher = createHttp1EnvHttpProxyAgent();
       } else if (params.pinDns === false) {
         dispatcher = createPolicyDispatcherWithoutPinnedDns(params.dispatcherPolicy);
       } else {
+        const pinned = await resolvePinnedHostnameWithPolicy(parsedUrl.hostname, {
+          lookupFn: params.lookupFn,
+          policy: params.policy,
+        });
         dispatcher = createPinnedDispatcher(pinned, params.dispatcherPolicy, params.policy);
       }

Source: GitHub Commit d7c3210

Detection Methods for CVE-2026-41916

Indicators of Compromise

  • Unusual authentication patterns immediately following configuration reload events
  • Gateway connections established with credentials that were recently revoked or modified
  • Log entries showing successful authentication for users whose permissions were changed during config reload
  • Anomalous access to protected resources by accounts with recently modified permissions

Detection Strategies

  • Monitor configuration reload events and correlate with subsequent authentication activity
  • Implement logging to track authentication state changes and identify connections using stale credentials
  • Set up alerts for access attempts to resources by users whose permissions were recently modified
  • Review gateway connection logs for sessions that span configuration reload events

Monitoring Recommendations

  • Enable detailed logging for all configuration reload operations in OpenClaw
  • Monitor authentication state transitions during and immediately after configuration changes
  • Implement session validation checks that verify authentication state freshness
  • Track DNS resolution patterns and dispatcher creation events for anomalies

How to Mitigate CVE-2026-41916

Immediate Actions Required

  • Upgrade OpenClaw to version 2026.4.8 or later immediately
  • Review recent access logs for potential exploitation during configuration reload windows
  • Audit current authentication states and force re-authentication for active sessions if compromise is suspected
  • Implement additional session validation checks if immediate patching is not possible

Patch Information

The vulnerability has been addressed in OpenClaw version 2026.4.8. The fix relocates the DNS pinning resolution logic to occur only when needed (inside the conditional block for pinned dispatcher creation), preventing stale authentication state from persisting after trusted environment proxy configurations are applied.

Patch details:

Workarounds

  • Minimize configuration reload operations in production environments until patching is complete
  • Force session termination and re-authentication after any configuration reload event
  • Implement additional authentication validation middleware that verifies credential freshness
  • Consider using trusted environment proxy mode consistently to reduce attack surface
bash
# Upgrade OpenClaw to the patched version
npm update openclaw@2026.4.8

# Verify the installed version
npm list openclaw

# Force session refresh after configuration changes (if supported)
openclaw-cli session refresh --all

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.