Summary
OpenClaw before 2026.3.23 contains an authorization flaw in the Gateway agent's /reset endpoint, where users with only operator.write permission can reset admin sessions.
By invoking /reset or /new with an explicit sessionKey, an attacker with elevated but non-admin privileges can bypass operator.admin requirements and reset arbitrary sessions, impacting administrative control and availability.
Affected context
This vulnerability exists in OpenClaw Gateway deployments that:
- Expose the Gateway agent's /reset and /new endpoints
- Use role- or permission-based access control with operator.write and operator.admin roles
- Rely on the backend to enforce which identities can reset or manipulate sessions
The issue is particularly relevant in environments where operator.write is broadly granted to operational users, automation, or service accounts that are not intended to have administrative control over other users' sessions.
Exploit preconditions
- Attack surface: Application/API layer via the Gateway agent endpoints (/reset and /new).
- Required access: Valid authenticated account with operator.write permission (but not operator.admin).
- Trigger point: Sending a request to /reset or /new including an explicit sessionKey parameter for the target session.
- Why exploitation is possible: The authorization logic on these endpoints fails to enforce the operator.admin requirement when a sessionKey is supplied, allowing lower-privileged users to act on sessions they do not own.
Why this happens
The root cause is a missing or incomplete authorization check on sensitive session management endpoints.
Specifically, the Gateway agent's /reset and /new handlers do not correctly validate that the caller holds operator.admin privileges before allowing operations on arbitrary sessions when a sessionKey is provided.
This maps to CWE-862: Missing Authorization, where security-critical operations (such as resetting or manipulating sessions) are exposed without verifying that the requester is authorized for the specific action or target resource.
Potential impact
- Forced logout or disruption of admin users by resetting their active sessions.
- Degradation of administrative availability by repeatedly resetting targeted admin sessions.
- Potential interference with operational workflows dependent on stable admin sessions.
- Increased risk of social engineering or confusion during incident response due to unexplained session resets.
General mitigation guidance
Effective mitigation focuses on enforcing strict, explicit authorization for all session management operations:
- Ensure that endpoints performing privileged actions (e.g., /reset, /new with sessionKey) require the highest relevant permission (such as operator.admin) regardless of client-supplied parameters.
- Apply resource-level authorization, confirming that the caller is permitted to act on the specific session identified by sessionKey (for example, ownership checks or admin-only overrides).
- Centralize permission checks in a shared authorization layer instead of duplicating logic in each handler, reducing the chance of inconsistent or missing checks.
- Default sensitive endpoints to deny access unless a clear, positive authorization decision is made ("default deny" posture).
- Restrict the assignment of operator.write and similar broad operational roles, and periodically review role mappings to minimize the impact of authorization flaws.
How teams detect issues like this
Detection typically involves both code-level review and runtime monitoring:
- Static analysis and code review:
- Search for controller or handler methods that perform session operations (reset, invalidate, create with sessionKey) and verify they consistently invoke centralized authorization checks.
- Flag any logic branches where authorization depends on optional parameters or where the presence of a parameter (like sessionKey) changes the permission requirement.
- Use custom linting or SAST rules to identify sensitive operations (session reset, privilege changes) that do not enforce a high-privilege role.
- Runtime and logging:
- Instrument detailed logging for all calls to /reset and /new, including caller identity, permissions, target sessionKey, and authorization decision.
- Monitor for patterns where non-admin accounts are frequently resetting sessions or targeting multiple distinct session keys.
- Employ anomaly detection to surface unusual session reset activity originating from accounts that should not typically perform such operations.

