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

CVE-2026-34511: OpenClaw: Gemini OAuth exposed the PKCE verifier through the OAuth state parameter

highCVSS 4.0 7.0GHSA-9jpj-g8vv-j5mf

OpenClaw 2026.4.1 and earlier reuses the PKCE code verifier as the OAuth state value in its Gemini browser sign-in. The state is sent in the authorization URL and echoed in the redirect, so anyone who sees that URL gets the verifier along with the code. Upgrade to 2026.4.2.

Published Apr 4, 2026 · Updated Apr 7, 2026 · Analysis Oct 30, 2026

What an attacker can do

PKCE protects an OAuth login by keeping the code verifier secret. Only its hash, the challenge, goes to the provider. The verifier is shown at the token step. In OpenClaw's Gemini flow, extensions/google/oauth.flow.ts passed the verifier itself as the state query parameter. The provider reflects state back in the redirect URL, and the authorization URL carries it too.

An attacker who captures the redirect URL, or the authorization URL, has both the authorization code and the verifier. That is everything needed to redeem the code for tokens. The protection PKCE adds against code interception is gone for this flow.

The vector needs the attacker to see the URL, for instance in browser history, a shared screen, logs, a proxy or a pasted link, and an active login by a user. The rating is high with high attack complexity. With the tokens the attacker gets access to the Google account services that the OpenClaw sign-in was authorized for. Anyone who signs into Gemini through OpenClaw on an affected version is exposed.

Who is affected

openclaw on npm, version 2026.4.1 and earlier, for users of the Gemini browser sign-in (the Google plugin's loginGeminiCliOAuth). Check the installed version:

npm ls openclaw

Use npm ls -g openclaw for a global install.

openclaw

Ecosystem
npm
Affected
<= 2026.4.1
Fixed in
2026.4.2
Check
npm ls openclaw

How to fix it

Upgrade to openclaw 2026.4.2 or later:

npm install [email protected]

Commit a26f4d0f3ef0757db6c6c40277cc06a5de76c52f generates a separate random state (32 random bytes as hex) and checks it on the callback, so the verifier stays out of the URL. A pasted bare code is no longer accepted: the user must paste the full redirect URL. Because earlier sign-ins exposed the verifier, consider revoking the Google grant for OpenClaw and signing in again after upgrading.

How to tell if you were hit

Look in browser history, proxy logs and shared-screen recordings for Google authorization or redirect URLs from OpenClaw sign-ins. A state value that is long and URL-safe and also appears as the code_verifier in the token request is the signature of the flaw. Check your Google account's security page for unfamiliar sessions or grants. The sources give no OpenClaw log line for this flaw.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

Before OpenClaw 2026.4.2, the Gemini OAuth flow reused the PKCE verifier as the OAuth state value. Because the provider reflected state back in the redirect URL, the verifier could be exposed alongside the authorization code.

Impact

Anyone who could capture the redirect URL could learn both the authorization code and the PKCE verifier, defeating PKCE's interception protection for that flow and enabling token redemption.

Affected Packages / Versions

  • Package: openclaw (npm)
  • Affected versions: <= 2026.4.1
  • Patched versions: >= 2026.4.2
  • Latest published npm version: 2026.4.1

Fix Commit(s)

  • a26f4d0f3ef0757db6c6c40277cc06a5de76c52f — separate OAuth state from the PKCE verifier

OpenClaw thanks @BG0ECV for reporting.

Credited to BG0ECV.

Questions

Which OpenClaw version fixes CVE-2026-34511?

2026.4.2. Versions up to and including 2026.4.1 are affected.

Do I need to sign in again after upgrading?

The advisory does not say. Since earlier sign-ins put the verifier in a URL, revoking the grant and signing in again is a cautious step.

What does the attacker need?

The redirect URL of a sign-in in progress, which holds both the authorization code and the verifier. The CVSS vector marks the attack complexity as high and needs user action.

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