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

CVE-2026-35656: OpenClaw: Forwarding header spoofing bypasses gateway.trustedProxies origin detection

mediumCVSS 4.0 6.3 · 3.1 6.5GHSA-844j-xrrq-wgh4

With gateway.trustedProxies set, OpenClaw before 2026.3.22 accepted fake loopback entries in forwarding headers as the real client origin. An outside client could look local and weaken Canvas authentication and auth rate limiting. Upgrade openclaw to 2026.3.22 or later.

Published Mar 26, 2026 · Updated Apr 10, 2026 · Analysis Oct 31, 2026

What an attacker can do

When the Gateway sits behind a reverse proxy, it reads headers like X-Forwarded-For to find the real client address. It should walk the chain and trust only hops added by proxies listed in gateway.trustedProxies. Before the fix, src/gateway/net.ts accepted loopback hops from the forwarded chain, so a client could send a header such as X-Forwarded-For: 127.0.0.1 and be resolved as a local client (CWE-290, spoofing).

That resolved identity feeds two decisions: Canvas authentication, which treats local-direct requests specially, and the gateway auth rate limiter. A spoofed loopback origin lets the attacker take the local path in Canvas auth and blur rate limiting, so brute-force attempts are counted against the wrong address or skipped.

The attacker needs only network access to a Gateway that uses trustedProxies (PR:N). The CVSS vectors score low confidentiality and integrity impact, and the attack-requirements flag shows it depends on that configuration. Deployments with no trustedProxies setting do not rely on this logic.

Who is affected

Affected: the openclaw npm package before 2026.3.22, when gateway.trustedProxies is configured. Check the version and whether the setting is present in your config:

npm ls openclaw
openclaw --version

openclaw

Ecosystem
npm
Affected
< 2026.3.22
Fixed in
2026.3.22
Check
npm ls openclaw

How to fix it

Upgrade to openclaw 2026.3.22 or later; 2026.3.23 and 2026.3.23-2 contain the fix.

npm install -g openclaw@latest

Fix commit fc2d29ea926f47c428c556e92ec981441228d2a4 changes src/gateway/net.ts to ignore loopback forwarded hops before trusted-proxy client resolution. Canvas auth and the auth rate limiter use that resolved identity. The advisory lists no workaround; have your reverse proxy overwrite, not append to, X-Forwarded-For so clients cannot add their own entries.

How to tell if you were hit

Search access logs for requests whose X-Forwarded-For or Forwarded header contains 127.0.0.1 or ::1 although the TCP peer is your proxy and the real client is external. Look for repeated failed auth attempts that the rate limiter attributes to a loopback address, and for Canvas requests accepted from such clients.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

When gateway.trustedProxies was configured, spoofed loopback hops in forwarding headers could be accepted as the client origin and weaken downstream auth and rate-limit decisions.

Affected Packages / Versions

  • Package: openclaw (npm)
  • Affected: < 2026.3.22
  • Fixed: >= 2026.3.22
  • Latest released tag checked: v2026.3.23-2 (630f1479c44f78484dfa21bb407cbe6f171dac87)
  • Latest published npm version checked: 2026.3.23-2

Fix Commit(s)

  • fc2d29ea926f47c428c556e92ec981441228d2a4

Release Status

The fix shipped in v2026.3.22 and remains present in v2026.3.23 and v2026.3.23-2.

Code-Level Confirmation

  • src/gateway/net.ts now ignores loopback forwarded hops before trusted-proxy client resolution.
  • That shipped origin fix is the one consumed by canvas auth and gateway auth-rate-limit paths that rely on resolved client identity.

OpenClaw thanks @lintsinghua for reporting.

Credited to lintsinghua.

Questions

Am I affected without gateway.trustedProxies?

The advisory describes the flaw as occurring when gateway.trustedProxies was configured. Without that setting, forwarded headers are not used to resolve the client origin in this way.

What can a spoofed loopback origin do?

It weakens downstream decisions that use the resolved client identity: Canvas authentication and the gateway auth rate limit.

How does this relate to the Canvas local-direct bypass?

They are separate advisories. This entry covers header spoofing that makes a client look local; the separate Canvas entry covers local requests skipping authentication, fixed in 2026.3.23.

Is it exploited in the wild?

No source reports exploitation, and it is not in CISA's KEV catalog. The EPSS score is 0.0031.

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