CVE-2025-4144: @cloudflare/workers oauth provider @cloudflare/workers-oauth-provider PKCE Bypass Vulnerability

MODERATE
Advisory Identifier: GHSA-qgp8-v765-qxx9
CWE-287
Published
Advisory Summary

CVE-2025-4144 is a MODERATE @cloudflare/workers-oauth-provider pkce bypass vulnerability (CWE-287: Improper Authentication) affecting @cloudflare/workers oauth provider libraries in the npm ecosystem. The issue involves @cloudflare/workers-oauth-provider pkce bypass via downgrade attack. Remediation is available by upgrading affected packages to version 0.0.5.

CVE-2025-4144 at a Glance

CVE Identifier CVE-2025-4144
GHSA Identifier GHSA-qgp8-v765-qxx9
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-287: Improper Authentication
Affected Product @cloudflare/workers oauth provider
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2025-4144

To remediate this vulnerability, upgrade all affected @cloudflare/workers oauth provider dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@cloudflare/workers-oauth-provider fixed: 0.0.5
npm install @cloudflare/workers-oauth-provider@0.0.5
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @cloudflare/workers-oauth-provider

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2025-4144, inspect your project dependencies using npm:

npm ls @cloudflare/workers-oauth-provider

Analyze the terminal output to locate any version of @cloudflare/workers oauth provider in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.0.5), your application is affected.

Note: The npm ls @cloudflare/workers-oauth-provider command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. In @cloudflare/workers oauth provider, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary PKCE was implemented in the OAuth implementation in workers-oauth-provider that is part of[ MCP framework](https://github.com/cloudflare/workers-mcp). 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

CVE-2025-4144 Affected @cloudflare/workers oauth provider Versions

1 component(s)
Fixed Versions:
0.0.5
Product / Package Ecosystem Affected Versions Fixed Version
@cloudflare/workers-oauth-provider
npm
< 0.0.5
0.0.5

References

Frequently Asked Questions

What is CVE-2025-4144?
CVE-2025-4144 is a security vulnerability in @cloudflare/workers oauth provider involving @cloudflare/workers-oauth-provider PKCE bypass via downgrade attack under CWE-287: Improper Authentication.
Which @cloudflare/workers oauth provider versions are affected?
Affected versions include releases prior to 0.0.5 across affected packages: @cloudflare/workers-oauth-provider.
What version fixes CVE-2025-4144?
Upgrading to 0.0.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @cloudflare/workers-oauth-provider affected?
Yes, @cloudflare/workers-oauth-provider is affected in releases prior to 0.0.5. Upgrade your dependency to 0.0.5 or later.
What CWE is associated with CVE-2025-4144?
CVE-2025-4144 is classified under CWE-287: Improper Authentication (When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.).
How can I check npm dependencies for CVE-2025-4144?
Run the dependency tree command: 'npm ls @cloudflare/workers-oauth-provider'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-qgp8-v765-qxx9",
  "modified" : "2025-05-01T17:01:42Z",
  "published" : "2025-05-01T17:01:42Z",
  "aliases" : [ "CVE-2025-4144" ],
  "summary" : "@cloudflare/workers-oauth-provider PKCE bypass via downgrade attack",
  "details" : "### Summary\nPKCE was implemented in the OAuth implementation in workers-oauth-provider that is part of[ MCP framework](https://github.com/cloudflare/workers-mcp). However, it was found that an attacker could cause the check to be skipped.\n\n### Impact\nPKCE 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.)\nThis bug completely bypasses PKCE protection.\n\n\n### Patches\nFixed in: https://github.com/cloudflare/workers-oauth-provider/pull/27\n\nWe 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.\n\n### Workarounds\nNone",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@cloudflare/workers-oauth-provider"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.0.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/cloudflare/workers-oauth-provider/security/advisories/GHSA-qgp8-v765-qxx9"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-4144"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cloudflare/workers-oauth-provider/pull/27"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/cloudflare/workers-oauth-provider"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-287" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-05-01T17:01:42Z",
    "nvd_published_at" : null
  }
}