CVE-2025-4143: @cloudflare/workers-oauth-provider Redirect URI Validation Flaw
Summary
CVE-2025-4143: @cloudflare/workers-oauth-provider missing validation of redirect_uri on authorize endpoint. 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 library designed to facilitate OAuth 2.0 authentication in applications built on the Cloudflare Workers platform. It provides a framework for implementing secure authorization flows, including PKCE (Proof Key for Code Exchange). However, it has a critical vulnerability related to the validation of redirect URIs, which can lead to unauthorized access and credential theft.
Vulnerability Detail
The vulnerability arises from the lack of validation for the redirect_uri parameter during the authorization process. While PKCE was implemented, an attacker could exploit this oversight by tricking a victim into visiting a malicious site after they have authorized an OAuth client. If the OAuth server automatically approves authorizations from previously authorized clients, the attacker could potentially gain access to the victim's credentials and impersonate them. This flaw is particularly dangerous as it undermines the fundamental security principles of OAuth, specifically the need to verify redirect URIs against an allowed list.
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 no known workarounds for this vulnerability. The best course of action is to update to the patched version of the package as soon as possible.
Conclusion
The vulnerability identified as CVE-2025-4143 in the @cloudflare/workers-oauth-provider poses significant security risks due to the lack of redirect URI validation. It is imperative for developers using this library to update to version 0.0.5 or later to protect against potential credential theft and unauthorized access.
See every vulnerability recorded for @cloudflare/workers-oauth-provider →
FAQ
CVE-2025-4143 is a vulnerability in the @cloudflare/workers-oauth-provider that allows attackers to bypass redirect URI validation, potentially leading to credential theft.
You can check if your application is affected by using Vulert, which monitors open-source vulnerabilities in real-time. Visit Vulert Scanner to analyze your package-lock.json without any signup.
The primary risk is that an attacker could impersonate a victim by stealing their OAuth credentials, leading to unauthorized access to sensitive information.
Yes, a patch is available in version 0.0.5 of the @cloudflare/workers-oauth-provider. It is crucial to update to this version to mitigate the vulnerability.
While there are no workarounds, it is essential to prioritize updating the package to the patched version as soon as possible to ensure the security of your application.
References
Related vulnerabilities
Recent vulnerabilities recorded for @cloudflare/workers-oauth-provider.