NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · OpenClaw

CVE-2026-41342: OpenClaw: CLI Remote Onboarding Persists Unauthenticated Discovery Endpoint and Exfiltrates Gateway Credentials

highCVSS 4.0 7.4 · 3.1 7.3GHSA-3cw3-5vxw-g2h3

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 openclaw

Inspect 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.28 contains 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 entries