OpenClaw has a Gateway HTTP /v1/models Route Bypasses Operator Read Scope

Description

> Fixed in OpenClaw 2026.3.24, the current shipping release.

Summary

The OpenAI-compatible HTTP endpoint /v1/models accepts bearer auth but does not enforce operator method scopes.

In contrast, the WebSocket RPC path enforces operator.read for models.list.

A caller connected with operator.approvals (no read scope) is rejected for models.list (missing scope: operator.read) but can still enumerate model metadata through HTTP /v1/models.

Confirmed on current main at commit 06de515b6c42816b62ec752e1c221cab67b38501.

Details

The WS control-plane path enforces role/scope checks centrally before dispatching methods. For non-admin operators, this includes required method scopes such as operator.read for models.list.

The HTTP compatibility path for /v1/models performs bearer authorization and then returns model metadata; it does not apply an equivalent scope check.

As reproduced, a caller with only operator.approvals can:

  1. connect successfully,
  2. fail models.list over WS with missing scope: operator.read,
  3. fetch /v1/models over HTTP with status 200 and model data.

This is a cross-surface authorization inconsistency where the stricter WS policy can be bypassed via HTTP.

Impact

  • Callers lacking operator.read can still enumerate gateway model metadata through HTTP compatibility routes.
  • Breaks scope model consistency between WS RPC and HTTP surfaces.
  • Weakens least-privilege expectations for operators granted non-read scopes.

Patch Suggestion

1) Enforce read scope on /v1/models routes

Apply a scope gate equivalent to models.list before serving /v1/models or /v1/models/:id.

2) Reuse centralized scope-authorization helper for HTTP compatibility endpoints

Use the same operator scope logic used by WS dispatch (authorizeOperatorScopesForMethod(...)) to prevent policy drift.

3) Add regression tests

Keep this PoC and add explicit negative/positive controls:

  • operator.approvals without read is rejected on HTTP /v1/models.
  • operator.read is accepted on both WS models.list and HTTP /v1/models.

Credit

Reported by @zpbrent.

Basic information

Type
reviewed
Severity
medium
Advisory on GitHub
Open advisory ↗
Repository advisory
Open repository advisory ↗
Source code
Browse source ↗
Published (advisory)
2026-03-30 18:41:15 UTC
Updated
2026-04-10 19:45:09 UTC
GitHub reviewed
2026-03-30 18:41:15 UTC
NVD published
2026-04-10

EPSS Score

Score Percentile
0.03% 8.78%

CVSS Scores

Base score Version Severity Vector
4.3 3.1
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:L)
Some sensitive info could get out, but not a total data dump.
Integrity (I:N)
Data isn’t meaningfully altered or forged.
Availability (A:N)
Service keeps running; no real outage angle.
5.3 4.0
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network.
Attack complexity (AC:L)
Exploitation conditions are straightforward and stable.
Attack requirements (AT:N)
No additional preconditions are required beyond normal reachability.
Privileges required (PR:L)
Low privileges are required.
User interaction (UI:N)
No user interaction is required.
Vulnerable system confidentiality impact (VC:L)
Limited confidentiality impact on the vulnerable system.
Vulnerable system integrity impact (VI:N)
No integrity impact on the vulnerable system.
Vulnerable system availability impact (VA:N)
No availability impact on the vulnerable system.
Subsequent system confidentiality impact (SC:N)
No confidentiality impact on subsequent systems.
Subsequent system integrity impact (SI:N)
No integrity impact on subsequent systems.
Subsequent system availability impact (SA:N)
No availability impact on subsequent systems.

Identifiers

CWEs

CWE id Name
CWE-284 Improper Access Control
CWE-863 Incorrect Authorization

Credits

  • zpbrent (reporter)

Affected packages (1)

Vulnerable version ranges and first patched releases as published by GitHub.

Ecosystem Package Vulnerable range First patched Vulnerable functions
npm openclaw <= 2026.3.23 2026.3.24

References

cvelogic Threat Intelligence