/

CVE-2026-45001

Severity:

HIGH RISK

(7.1)

Missing Authorization in OpenClaw Gateway Configuration

CVE-2026-45001

Analyzed

Vulnerability type

Category:

Missing Authorization

CWE:

CWE-862

Impact:

Unauthorized Configuration Modification and Policy Downgrade

Severity:

HIGH RISK

(7.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.4.20 exposes a guard bypass in the agent-facing config.patch and config.apply gateway endpoints, allowing modification of operator-trusted settings without proper authorization checks.

A prompt-injected model that can access the owner-only gateway tool may persist unauthorized changes to sandbox policies, plugins, gateway auth/TLS, routing hooks, MCP servers, SSRF controls, and filesystem hardening, potentially weakening overall system security.

Affected context

The vulnerability appears in OpenClaw deployments where:

  • Agent-facing gateway endpoints (config.patch and config.apply) are exposed for configuration management
  • Operator-trusted settings (sandbox policy, plugin enablement, gateway auth/TLS, hook routing, MCP server configuration, SSRF policy, filesystem hardening) are intended to be protected from routine agent-level changes
  • Models or agents can invoke an "owner-only" gateway tool, but the backend endpoints do not consistently enforce the stricter authorization rules for protected settings

In such contexts, a compromised or prompt-injected model can act through the gateway tool to alter security-sensitive configuration that operators normally treat as static or tightly controlled.

Exploit preconditions

  • Attack surface: Agent-facing gateway API, specifically the config.patch and config.apply endpoints.
  • Required access: Ability for a model or automated agent to invoke the owner-only gateway tool, either legitimately (via intended capabilities) or via prompt injection / model misuse.
  • Trigger point: Submission of configuration updates that include operator-trusted fields (sandbox policies, plugin toggles, authentication/TLS, routing hooks, MCP endpoints, SSRF rules, filesystem protections).
  • Why exploitation is possible: The endpoints perform configuration changes without reliably enforcing fine-grained authorization on protected settings, allowing a caller with generic tool access to bypass intended operator-only guards and persist policy downgrades.

Why this happens

The root cause is incomplete authorization enforcement on sensitive configuration paths, aligning with CWE-862: Missing Authorization.

The gateway exposes configuration mutation endpoints that treat all configuration fields similarly, without consistently distinguishing operator-trusted settings from routine, agent-tunable options.

As a result, calls originating from models via the owner-only tool are trusted as if they were operator actions, even when they target critical security controls like sandboxing, network egress rules, or filesystem hardening.

This design pattern places too much trust in the caller identity (the tool) rather than enforcing explicit, server-side checks for each protected configuration domain.

Potential impact

  • A prompt-injected or compromised model can weaken or disable sandbox policies, increasing the blast radius of subsequent compromises.
  • Plugins may be silently enabled, disabled, or reconfigured, altering the agent's capability surface and enabling abuse of powerful integrations.
  • Gateway authentication or TLS settings can be downgraded, misconfigured, or turned off, exposing traffic to interception or impersonation.
  • Hook routing and MCP server configurations can be modified to redirect data flows, exfiltrate information, or inject untrusted external control planes.
  • SSRF policies may be relaxed, allowing the system to reach internal services or metadata endpoints previously restricted.
  • Filesystem hardening options can be reduced, giving agents broader read/write access to local data and configuration.
  • Overall, operators may lose assurance that their security posture remains as configured, because unauthorized changes can persist without clear visibility.

General mitigation guidance

Mitigation typically focuses on reinforcing authorization boundaries around configuration management and segregating sensitive controls from routine agent operations.

Recommended patterns include:

  • Field-level authorization: Apply explicit server-side checks that distinguish operator-trusted settings (sandbox, auth/TLS, SSRF, filesystem, routing, MCP endpoints, plugin controls) from regular configuration, enforcing stricter roles or trust levels for protected fields.
  • Config tiering: Split configuration into separate domains (e.g., operator-only security baseline vs. agent-tunable preferences) and expose only the safe tier through agent-facing tools.
  • Policy-as-code with approval workflows: Require human/operator approval or out-of-band verification for changes to critical security policies or network-related knobs.
  • Defense-in-depth at the gateway: Enforce immutable or minimally mutable defaults for high-risk options, such as mandatory TLS, non-bypassable sandbox boundaries, and non-relaxable SSRF rules.
  • Least-privilege for tools: Design gateway tools so models have the smallest feasible configuration surface, avoiding general-purpose config mutation APIs where possible.

How teams detect issues like this

Effective detection focuses on both code-level authorization gaps and runtime configuration anomalies.

Potential strategies include:

  • Static analysis and code review:
  • Search for configuration endpoints that update security-sensitive fields without explicit role or capability checks.
  • Flag handlers that accept generic configuration blobs and apply them directly without field-by-field authorization logic.
  • Review any "owner-only" or privileged tools to ensure that their backend implementations enforce the intended access model.
  • Configuration change monitoring:
  • Log all changes to operator-trusted settings, including who/what initiated the change and via which tool or endpoint.
  • Establish alerts for modifications to sandbox policies, plugin enablement, auth/TLS parameters, SSRF rules, MCP endpoints, and filesystem protections.
  • Policy enforcement:
  • Apply centralized policy engines (e.g., authorization middlewares or policy-as-code frameworks) to enforce that only authorized principals can mutate high-risk configuration keys.
  • Automated review tooling:
  • Use security scanners or CI checks tuned to flag missing authorization around configuration APIs, as well as unexpected diffs in security-related configuration files.

Sources

SourceLink
github.comgithub.com/openclaw/openclaw/commit/fe30b31a97a917ecc6e92f6c85378b6b20352422
github.comgithub.com/openclaw/openclaw/security/advisories/GHSA-7jm2-g593-4qrc
vulncheck.comvulncheck.com/advisories/openclaw-gateway-config-mutation-guard-bypass-via-agent-tool-access

Frequently asked

questions

Exploitability is generally constrained to environments where models or agents can invoke the owner-only gateway tool and where those calls are not tightly supervised. It does not usually grant external unauthenticated attackers direct access but enables privilege misuse inside the AI or automation stack.

An attacker typically needs influence over a model or agent that has access to the gateway configuration tool, such as via prompt injection, jailbreaks, or compromised upstream instructions. They do not necessarily need separate system credentials if the model's tool access is already trusted by the gateway.

The most robust fix is to implement strict, field-level authorization and configuration tiering so that operator-trusted security settings cannot be changed through agent-facing endpoints at all, or can only be changed by clearly authenticated and authorized operator identities with explicit approval paths.

Prevention relies on designing configuration APIs with least-privilege in mind, treating security-sensitive configuration as a protected asset, and enforcing server-side authorization for each protected field. Incorporating security reviews, automated checks for missing authorization, and strong audit logging for configuration changes helps maintain these guarantees over time.

Find out what's already
exploitable in your codebase.