GHSA-cwj3-vqpp-pmxr: OpenClaw's gateway config mutation guard allowed unsafe model-driven config writes
OpenClaw before 2026.4.23 let a model write unsafe settings to its persistent config through the owner-only gateway tool. A prompt-injected agent could change command execution, proxy and TLS, credential forwarding or policy settings, and the changes survive a restart. Upgrade to openclaw 2026.4.23, which replaces the protection list with an allowlist.
Published May 5, 2026 · Updated May 29, 2026 · Analysis Oct 28, 2026
What an attacker can do
OpenClaw's agent-facing gateway tool offers config.apply and config.patch. These calls cross a boundary: the model is not a trusted principal, but the config controls what the operator's system does. The guard that protected the boundary was a hand-kept denylist of protected config paths. As the config schema grew, new sensitive subtrees were never added to the list, so they stayed writable.
The advisory names these classes of unprotected paths: command execution, network, proxy and TLS behavior, credential forwarding, telemetry or hook endpoints, memory and indexing surfaces, and operator policy controls. The commit's tests show examples of paths now rejected, such as gateway.remote.url, tools.allow, tools.elevated.enabled, memory.qmd.command and browser.executablePath.
The attack needs a model with access to the owner-only gateway tool that is prompt-injected or otherwise compromised, for example by a web page or message it reads. It then writes config that turns on tools, points traffic at an attacker host or swaps an executable path. Because the change is persisted, it outlasts the session and a restart. The CVSS vector reflects high impact on confidentiality, integrity and availability.
Who is affected
The npm package openclaw in versions before 2026.4.23, where an agent has access to the gateway tool. Check the installed version:
npm ls -g openclawAfter upgrading, also review the config file for values you did not set.
openclaw
- Ecosystem
- npm
- Affected
- < 2026.4.23
- Fixed in
- 2026.4.23
- Check
npm ls openclaw
How to fix it
Upgrade to openclaw 2026.4.23 or later:
npm install -g openclaw@latestThe fix commit bceda60 replaces the denylist with a fail-closed allowlist in src/agents/tools/gateway-tool.ts. Agent-driven config.apply and config.patch now accept only narrow prompt, model and mention-gating paths, such as agents.defaults.model, agents.defaults.systemPromptOverride and channels.*.requireMention. Other changes are rejected before the gateway mutation RPC runs. The advisory gives no workaround for unpatched versions.
How to tell if you were hit
Review the OpenClaw config for entries you did not make, in particular tool allow lists, elevated tool settings, remote gateway URLs, proxy or TLS settings, hook and telemetry endpoints, and executable paths. Compare the file with version control or a known-good backup, and check its modification times against agent sessions. Look in gateway logs for config.apply and config.patch calls made by the agent. Beam records agent MCP tool calls and file access, which can show when a session wrote to the config file.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
The agent-facing gateway tool protects config.apply and config.patch with a model-to-operator trust boundary. That guard used a hand-maintained denylist of protected config paths. The config schema outgrew that denylist, leaving sensitive subtrees writable through model-driven gateway config mutations.
Impact
A prompt-injected or otherwise compromised model running with access to the owner-only gateway tool could persist unsafe config changes that crossed security boundaries. Examples included config paths affecting command execution, network/proxy/TLS behavior, credential forwarding, telemetry or hook endpoints, memory/indexing surfaces, and operator policy controls. These changes could survive restart once written to config.
Affected Packages / Versions
- Package:
openclawon npm - Affected: versions before
2026.4.23 - Fixed:
2026.4.23 - Latest stable verified fixed:
[email protected], tagv2026.4.23
Fix
OpenClaw replaced the denylist with a fail-closed allowlist. Agent-driven gateway config.apply and gateway config.patch now permit only narrow agent-tunable prompt/model settings and mention-gating paths. Other config changes are rejected before the gateway mutation RPC is invoked.
Fix Commit(s)
bceda6089aa7b3695cc7696b43c61ae3d01bb0ec(fix(gateway): fail closed on runtime config edits)
Severity
Severity remains high. The vulnerable entry point is owner-only, but the model/agent is not a trusted principal under OpenClaw's security model, and the guard is the explicit model-to-operator boundary for persisted config mutation.
Credited to zsxsoft, qclawer, KeenSecurityLab.
Questions
- Is OpenClaw 2026.4.22 affected by GHSA-cwj3-vqpp-pmxr?
Yes. Versions before 2026.4.23 are affected. The fix is in 2026.4.23.
- Does the attacker need to control the operator account?
No. The entry point is owner-only, but the advisory's concern is a prompt-injected or compromised model that holds the gateway tool. OpenClaw's model treats the model as untrusted.
- Do the unsafe changes go away on restart?
No. The advisory says the changes can survive a restart because they are written to config.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More OpenClaw vulnerabilities
All OpenClaw entriesCVE-2026-62197
OpenClaw: Browser CDP discovery could accept blocked WebSocket URLs
medium8.5Oct 21, 2026CVE-2026-35630
OpenClaw: QQBot native approval buttons did not enforce configured approver identity
high8.0Jul 2, 2026CVE-2026-53806
OpenClaw: Combined POSIX shell options could confuse exec revalidation
high8.8Jul 2, 2026CVE-2026-53809
OpenClaw: Embedded runner policy could be confused by provider aliases
medium3.8Jul 2, 2026CVE-2026-53810
OpenClaw's marketplace runtime extension metadata could point at unscanned payloads
high8.8Jul 2, 2026CVE-2026-53811
OpenClaw: Matrix allowFrom could bind to mutable display names
high8.8Jul 2, 2026
