VYPR
Medium severity5.4NVD Advisory· Published Apr 28, 2026· Updated Apr 30, 2026

CVE-2026-42421

CVE-2026-42421

Description

OpenClaw before 2026.4.8 contains a session management vulnerability where existing WebSocket sessions survive shared gateway token rotation. Attackers can maintain unauthorized access to WebSocket connections after token rotation by exploiting the failure to disconnect existing shared-token sessions.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
openclawnpm
< 2026.4.82026.4.8

Affected products

1
  • cpe:2.3:a:openclaw:openclaw:*:*:*:*:*:node.js:*:*
    Range: <2026.4.8

Patches

1
d7c3210cd6f5

fix(net): skip DNS pinning before trusted env proxy dispatch

https://github.com/openclaw/openclawMaxime GrenuApr 1, 2026via nvd-ref
3 files changed · +43 4
  • CHANGELOG.md+1 0 modified
    @@ -7,6 +7,7 @@ Docs: https://docs.openclaw.ai
     ### Fixes
     
     - Slack: honor ambient HTTP(S) proxy settings for Socket Mode WebSocket connections, including NO_PROXY exclusions, so proxy-only deployments can connect without a monkey patch. (#62878) Thanks @mjamiv.
    +- Network/fetch guard: skip target DNS pinning when trusted env-proxy mode is active so proxy-only sandboxes can let the trusted proxy resolve outbound hosts. (#59007) Thanks @cluster2600.
     
     ## 2026.4.7-1
     
    
  • src/infra/net/fetch-guard.ssrf.test.ts+38 0 modified
    @@ -81,6 +81,15 @@ async function expectRedirectFailure(params: {
     }
     
     describe("fetchWithSsrFGuard hardening", () => {
    +  const PROXY_ENV_KEYS = [
    +    "HTTP_PROXY",
    +    "HTTPS_PROXY",
    +    "ALL_PROXY",
    +    "http_proxy",
    +    "https_proxy",
    +    "all_proxy",
    +  ] as const;
    +
       type LookupFn = NonNullable<Parameters<typeof fetchWithSsrFGuard>[0]["lookupFn"]>;
       const CROSS_ORIGIN_REDIRECT_STRIPPED_HEADERS = [
         "authorization",
    @@ -100,10 +109,17 @@ describe("fetchWithSsrFGuard hardening", () => {
       const createPublicLookup = (): LookupFn =>
         vi.fn(async () => [{ address: "93.184.216.34", family: 4 }]) as unknown as LookupFn;
     
    +  function clearProxyEnv(): void {
    +    for (const key of PROXY_ENV_KEYS) {
    +      vi.stubEnv(key, "");
    +    }
    +  }
    +
       async function runProxyModeDispatcherTest(params: {
         mode: (typeof GUARDED_FETCH_MODE)[keyof typeof GUARDED_FETCH_MODE];
         expectEnvProxy: boolean;
       }): Promise<void> {
    +    clearProxyEnv();
         vi.stubEnv("HTTP_PROXY", "http://127.0.0.1:7890");
         (globalThis as Record<string, unknown>)[TEST_UNDICI_RUNTIME_DEPS_KEY] = {
           Agent: agentCtor,
    @@ -1032,4 +1048,26 @@ describe("fetchWithSsrFGuard hardening", () => {
         ).rejects.toThrow(/blocked/i);
         expect(fetchImpl).not.toHaveBeenCalled();
       });
    +
    +  it("falls back to DNS pinning in trusted proxy mode when no proxy env var is configured", async () => {
    +    clearProxyEnv();
    +    const lookupFn = createPublicLookup();
    +    const fetchImpl = vi.fn(async (_input: RequestInfo | URL, init?: RequestInit) => {
    +      const requestInit = init as RequestInit & { dispatcher?: unknown };
    +      expect(requestInit.dispatcher).toBeDefined();
    +      expect(getDispatcherClassName(requestInit.dispatcher)).not.toBe("EnvHttpProxyAgent");
    +      return okResponse();
    +    });
    +
    +    const result = await fetchWithSsrFGuard({
    +      url: "https://public.example/resource",
    +      fetchImpl,
    +      lookupFn,
    +      mode: GUARDED_FETCH_MODE.TRUSTED_ENV_PROXY,
    +    });
    +
    +    expect(fetchImpl).toHaveBeenCalledTimes(1);
    +    expect(lookupFn).toHaveBeenCalledOnce();
    +    await result.release();
    +  });
     });
    
  • src/infra/net/fetch-guard.ts+4 4 modified
    @@ -313,17 +313,17 @@ export async function fetchWithSsrFGuard(params: GuardedFetchOptions): Promise<G
         try {
           assertExplicitProxySupportsPinnedDns(parsedUrl, params.dispatcherPolicy, params.pinDns);
           await assertExplicitProxyAllowed(params.dispatcherPolicy, params.lookupFn, params.policy);
    -      const pinned = await resolvePinnedHostnameWithPolicy(parsedUrl.hostname, {
    -        lookupFn: params.lookupFn,
    -        policy: params.policy,
    -      });
           const canUseTrustedEnvProxy =
             mode === GUARDED_FETCH_MODE.TRUSTED_ENV_PROXY && hasProxyEnvConfigured();
           if (canUseTrustedEnvProxy) {
             dispatcher = createHttp1EnvHttpProxyAgent();
           } else if (params.pinDns === false) {
             dispatcher = createPolicyDispatcherWithoutPinnedDns(params.dispatcherPolicy);
           } else {
    +        const pinned = await resolvePinnedHostnameWithPolicy(parsedUrl.hostname, {
    +          lookupFn: params.lookupFn,
    +          policy: params.policy,
    +        });
             dispatcher = createPinnedDispatcher(pinned, params.dispatcherPolicy, params.policy);
           }
     
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

4

News mentions

0

No linked articles in our index yet.