CVE-2026-41342: OpenClaw: CLI Remote Onboarding Persists Unauthenticated Discovery Endpoint and Exfiltrates Gateway Credentials
OpenClaw CLI up to 2026.3.24 saves a discovered remote gateway during onboarding without asking the user to trust it. A spoofed discovery endpoint on the local network can steer onboarding to an attacker's gateway and capture later gateway credentials and traffic. Fixed in 2026.3.28.
Published Mar 31, 2026 · Updated May 8, 2026 · Analysis Oct 31, 2026
What an attacker can do
The remote onboarding flow, promptRemoteGatewayConfig in src/commands/onboard-remote.ts, lists gateways found by network discovery. Once one was picked, it stored the remote URL and connection details with no explicit trust step and no pinned TLS fingerprint. The code uses the dns-sd or avahi-browse tools, which points to Bonjour-style local discovery, though the commit does not say so outright.
The attacker must sit on the same network (the vector is adjacent) and advertise a fake gateway. A user running onboarding must choose it, so interaction is required. After that, the CLI sends its gateway token and traffic to the attacker, who can read them and relay requests. With those credentials the attacker can drive the real agent gateway or impersonate it. Only people running remote onboarding on shared or untrusted networks are exposed.
Who is affected
npm package openclaw, versions up to and including 2026.3.24, for users who run the CLI remote onboarding with gateway discovery. Check the version:
npm ls openclawInspect your saved config for a remote gateway URL you do not recognize, and rotate credentials if you onboarded on an untrusted network.
openclaw
- Ecosystem
- npm
- Affected
- <= 2026.3.24
- Fixed in
- 2026.3.28
- Check
npm ls openclaw
How to fix it
Upgrade to openclaw 2026.3.28 or later:
npm install [email protected]Commit d6affb17d8 adds a Trust this gateway? prompt that shows host, port and TLS fingerprint, with the default set to no. A discovered fingerprint is pinned in the config only if the URL stays unchanged. If no fingerprint is advertised, the prompt warns the connection will not be pinned. Entering the URL by hand is the safe alternative.
How to tell if you were hit
Check the remote gateway URL saved by onboarding and compare it with your real gateway host. Look for an unexpected host or a missing TLS fingerprint pin. Search network logs for the CLI connecting to an unknown host on the gateway port. The advisory gives no other indicators. If you suspect a spoof, rotate the gateway token.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
Remote onboarding accepted discovered gateway endpoints without an explicit trust confirmation before persisting the remote URL and connection details.
Impact
A malicious or spoofed discovery endpoint could steer onboarding toward an attacker-controlled gateway and capture future gateway credentials or traffic.
Affected Component
src/commands/onboard-remote.ts
Fixed Versions
- Affected:
<= 2026.3.24 - Patched:
>= 2026.3.28 - Latest stable
2026.3.28contains the fix.
Fix
Fixed by commit d6affb17d8 (CLI: confirm discovered remote gateways before saving config).
Credited to nexrin, KeenSecurityLab, qclawer.
Questions
- Does CVE-2026-41342 need user interaction?
Yes. The victim has to run remote onboarding and select the spoofed gateway. The attacker also needs adjacent network access to advertise it.
- What does the fix add?
A trust prompt showing host, port and TLS fingerprint, defaulting to no, and fingerprint pinning when the discovered URL is kept.
- Which version is patched?
openclaw 2026.3.28. Versions up to and including 2026.3.24 are affected.
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
