CVE-2025-4144: @cloudflare/workers-oauth-provider PKCE Bypass via Downgrade Attack
Summary
CVE-2025-4144: @cloudflare/workers-oauth-provider PKCE bypass via downgrade attack. Affects @cloudflare/workers-oauth-provider versions < 0.0.5. Fixed in 0.0.5. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The @cloudflare/workers-oauth-provider is a package that facilitates OAuth 2.0 authentication for Cloudflare Workers, enabling secure access to resources. It implements the Proof Key for Code Exchange (PKCE) as a defense mechanism against certain attacks. This package is part of the MCP framework, which adheres to OAuth 2.1 standards. However, a vulnerability has been discovered that allows attackers to bypass the PKCE protection, compromising the security of the authentication process.
Vulnerability Detail
The vulnerability arises from a flaw in the PKCE implementation within the @cloudflare/workers-oauth-provider. An attacker can exploit this flaw to skip the PKCE check, effectively bypassing this important security measure. This could lead to unauthorized access to resources, as PKCE is designed to mitigate certain types of attacks in OAuth 2.0. The issue is particularly concerning as PKCE is a required feature in OAuth 2.1, which the MCP specification mandates.
How To Fix
Latest published version: 1.2.4 as of 23 Oct 2026
npm install @cloudflare/workers-oauth-provider@1.2.4
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
0.0.5
This is the first release that contains the fix.
npm install @cloudflare/workers-oauth-provider@0.0.5
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There are currently no workarounds available for this vulnerability. The only solution is to update to the patched version of the package.
Conclusion
The discovery of CVE-2025-4144 highlights a significant security flaw in the @cloudflare/workers-oauth-provider package, allowing for a PKCE bypass. It is essential for users of this package to update to version 0.0.5 or later to ensure their applications remain secure. Regular monitoring and updates are crucial in maintaining the integrity of your software.
See every vulnerability recorded for @cloudflare/workers-oauth-provider →
FAQ
The vulnerability allows an attacker to bypass the PKCE protection in the @cloudflare/workers-oauth-provider, compromising the security of OAuth 2.0 authentication.
You can check if your application is affected by using the Vulert playground at Vulert Scanner, which analyzes your package-lock.json for vulnerabilities.
PKCE, or Proof Key for Code Exchange, is a security extension for OAuth 2.0 that helps prevent authorization code interception attacks. It is now a required feature in OAuth 2.1.
Currently, there are no workarounds available. It is crucial to update to the patched version as soon as possible to mitigate the risk.
You can find more details about this vulnerability in the GitHub advisory database or the official Cloudflare repository.
References
Related vulnerabilities
Recent vulnerabilities recorded for @cloudflare/workers-oauth-provider.