/

CVE-2026-34512

Severity:

HIGH RISK

(8.1)

Improper Access Control in OpenClaw Session Termination

CVE-2026-34512

Analyzed

Vulnerability type

Category:

Improper Access Control

CWE:

CWE-863

Impact:

Privilege Escalation and Unauthorized Session Termination

Severity:

HIGH RISK

(8.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

OpenClaw before 2026.3.25 exposes an improper access control flaw in the /sessions/:sessionKey/kill HTTP route, allowing any bearer-authenticated user to call admin-level session termination logic.

By invoking killSubagentRunAdmin without correct scope checks, an attacker can terminate arbitrary subagent sessions they do not own, bypassing normal ownership and operator restrictions.

Affected context

This vulnerability arises in OpenClaw deployments that:

  • Expose the /sessions/:sessionKey/kill HTTP endpoint,
  • Use bearer authentication without enforcing granular authorization scopes on this route, and
  • Allow subagent sessions to be controlled via admin-level functions such as killSubagentRunAdmin.

In such environments, any authenticated bearer token holder may be able to issue kill commands against sessions they do not control, depending on how tokens are distributed and used.

Exploit preconditions

  • Attack surface: HTTP API endpoint /sessions/:sessionKey/kill
  • Required access: Possession of any valid bearer token (not necessarily admin or operator scoped)
  • Trigger point: Sending an authenticated request to the kill route with a chosen sessionKey
  • Why exploitation is possible: The route delegates to killSubagentRunAdmin without verifying that the caller has appropriate admin/operator scopes or ownership of the target session, resulting in missing or incorrect authorization checks.

Why this happens

The bug is a classic case of improper access control mapped to CWE-863, where the application authenticates the caller but fails to properly authorize the action being requested.

The /sessions/:sessionKey/kill endpoint relies on bearer authentication alone and invokes an administrative function (killSubagentRunAdmin) without validating:

  • Whether the caller has an admin role or specific scope permitting cross-session termination, and
  • Whether the caller owns the target session or is within the correct operator context.

Abstractly, this reflects an insecure pattern where sensitive operations are exposed behind coarse-grained "is logged in" checks instead of explicit permissions and resource-level authorization.

Potential impact

  • Attackers could terminate arbitrary subagent sessions owned by other users or teams.
  • Disruption of ongoing runs, jobs, or orchestrated workflows that depend on those subagents.
  • Potential denial of service conditions for targeted users or system components.
  • Loss of operational visibility or interruption of monitoring, automation, or analysis pipelines relying on these sessions.

General mitigation guidance

Effective mitigation centers on tightening authorization around sensitive administrative routes and ensuring that session control operations are scope-aware:

  • Enforce role- and scope-based authorization for all session-kill operations, requiring explicit admin or operator scopes before allowing cross-user or cross-tenant termination.
  • Implement ownership checks on session resources so that non-admin users can only terminate sessions they created or that are explicitly delegated to them.
  • Centralize authorization decisions via a dedicated policy layer or middleware, rather than embedding ad-hoc checks in controller logic.
  • Apply least privilege principles when designing bearer tokens and API clients, minimizing the default scopes available to non-admin users.
  • Log all session termination events with caller identity and target session details to support monitoring and incident response.

How teams detect issues like this

Organizations can approach detection and assurance through multiple layers:

  • Static analysis & code review:
  • Flag controller or route handlers that perform sensitive actions (e.g., kill, delete, admin operations) but lack explicit authorization checks or scope validation.
  • Look for direct calls to admin-level functions like killSubagentRunAdmin that are guarded only by generic "is authenticated" checks.
  • Policy enforcement:
  • Use centralized authorization middleware or policy engines to enforce consistent RBAC/ABAC rules for high-impact operations.
  • Define policies that require resource ownership or admin roles for cross-session operations.
  • Runtime monitoring:
  • Monitor logs for unusual patterns of session kills, such as many terminations initiated by the same low-privilege account or cross-tenant activity.
  • Integrate with SIEM systems to alert on anomalies related to session termination endpoints.
  • Automated tools:
  • Apply API security testing tools or dynamic scanners that attempt privilege escalation by reusing low-privilege tokens on admin-capable endpoints.

Sources

SourceLink
github.comgithub.com/openclaw/openclaw/commit/02cf12371f9353a16455da01cc02e6c4ecfc4152
github.comgithub.com/openclaw/openclaw/security/advisories/GHSA-9p93-7j67-5pc2
vulncheck.comvulncheck.com/advisories/openclaw-improper-access-control-in-sessions-sessionkey-kill-endpoint

Frequently asked

questions

Yes. Any remote client that can reach the /sessions/:sessionKey/kill endpoint and present a valid bearer token may be able to exploit it, depending on network exposure and token distribution.

No. The issue stems from missing scope and ownership validation, so a non-admin bearer token may be sufficient to terminate sessions belonging to other users or contexts.

Introduce strict authorization checks on the kill route, ensuring that only appropriately scoped admin or operator roles can terminate arbitrary sessions, and that non-admin users are limited to their own sessions. Centralizing these checks in an authorization layer helps avoid future inconsistencies.

Design APIs with explicit authorization requirements for each endpoint, use role/scope-based access control for all administrative operations, enforce resource ownership checks, and adopt security-focused code review and testing practices that specifically look for endpoints that modify or delete resources without clear authorization logic.

Find out what's already
exploitable in your codebase.