NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · Other MCP servers and tools

CVE-2025-4144: @cloudflare/workers-oauth-provider PKCE bypass via downgrade attack

mediumCVSS 4.0 5.3GHSA-qgp8-v765-qxx9

`@cloudflare/workers-oauth-provider` before 0.0.5 lets an attacker downgrade a PKCE-protected OAuth flow so the PKCE check is skipped. This removes the protection for MCP servers built on the library. Fixed in 0.0.5.

Published May 1, 2025 · Analysis Nov 1, 2026

What an attacker can do

PKCE binds an authorization code to the client that asked for it, so a stolen code is useless on its own. It was optional in OAuth 2.0 and is required in the OAuth 2.1 draft, which the MCP specification requires. The library implemented PKCE, but the advisory says an attacker could make the check be skipped. It describes this as a downgrade attack that completely bypasses PKCE protection. The text does not give the exact request that triggers it.

PKCE is a defense-in-depth measure. The bypass alone does not hand over an account. It matters when the attacker has also obtained an authorization code, for example by intercepting a redirect. With PKCE gone, that code can be redeemed by the attacker. The CVSS 4.0 vector reflects this: no privileges, user interaction required, low integrity impact and no confidentiality impact. MCP servers on Cloudflare Workers that use this library for sign-in are the ones affected.

Who is affected

Affected: @cloudflare/workers-oauth-provider below 0.0.5. Check:

npm ls @cloudflare/workers-oauth-provider

The advisory links the library to the Cloudflare MCP framework, so Workers-based MCP servers with OAuth sign-in are the usual users.

@cloudflare/workers-oauth-provider

Ecosystem
npm
Affected
< 0.0.5
Fixed in
0.0.5
Check
npm ls @cloudflare/workers-oauth-provider

How to fix it

Upgrade to 0.0.5 and redeploy the Worker:

npm install @cloudflare/[email protected]

The fix is in pull request 27. The advisory says there are no workarounds. The same 0.0.5 release also covers the redirect_uri check described in CVE-2025-4143.

How to tell if you were hit

Check Worker logs for token requests that succeed without a code_verifier for clients that started the flow with a code_challenge. Look for authorization codes redeemed from unexpected addresses. The advisory lists no log line.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

PKCE was implemented in the OAuth implementation in workers-oauth-provider that is part of MCP framework. However, it was found that an attacker could cause the check to be skipped.

Impact

PKCE is a defense-in-depth mechanism against certain kinds of attacks and was an optional extension in OAuth 2.0 which became required in the OAuth 2.1 draft. (Note that the MCP specification requires OAuth 2.1.) This bug completely bypasses PKCE protection.

Patches

Fixed in: https://github.com/cloudflare/workers-oauth-provider/pull/27

We patched up the vulnerabilities in the latest version, v 0.0.5 of the Workers OAuth provider (https://www.npmjs.com/package/@cloudflare/workers-oauth-provider). You'll need to update your MCP servers to use that version to resolve the vulnerability.

Workarounds

None

Questions

Is PKCE required for MCP servers?

The advisory notes the MCP specification requires OAuth 2.1, and PKCE is required in the OAuth 2.1 draft. That is why a bypass matters for MCP servers.

Is there a workaround?

No. The advisory states none. Upgrade to 0.0.5.

Does this bug alone let someone take over an account?

No. PKCE is defense in depth. The bypass removes one layer, so an attacker needs another way to obtain an authorization code. The CVSS score is 5.3, medium.

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 Other MCP servers and tools vulnerabilities

All Other MCP servers and tools entries