{"answers":{"affected":"2 open source packages ship an affected version, including @cloudflare/workers-oauth-provider. It affects 1 product.","exploited":"There is no known exploitation of CVE-2025-4143 in the wild and no public exploit code.","fix":"Upgrade @cloudflare/workers-oauth-provider to 0.0.5 or later.","what":"CVE-2025-4143 is a medium-severity vulnerability in cloudflare:workers-oauth-provider, published on 1 May 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2025-4143 and fix it if it is affected.\n\nWhat it is: CVE-2025-4143 is a medium-severity vulnerability in cloudflare:workers-oauth-provider, published on 1 May 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2025-4143 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- @cloudflare/workers-oauth-provider (npm): affected all versions; fixed in 0.0.5\n- @cloudflare/workers-oauth-provider (npm): affected all versions; fixed in 0.0.5\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2025-4143/ (Markdown: https://insights.sbomify.com/CVE-2025-4143/index.md)","id":"CVE-2025-4143","markdown":"https://insights.sbomify.com/CVE-2025-4143/index.md","name":"CVE-2025-4143","record":{"aliases":["GHSA-4pc9-x2fx-p7vj"],"analysis":{"component_type":"library","fix_type":"patch","impacts":["account_takeover","security_bypass"],"network_reachable":"yes","non_default_config":true,"product_category":"OAuth provider library","requires_auth":"none","summary":"Attackers can steal OAuth credentials via open redirect if the application auto-approves previously authorized clients, leading to account takeover.","user_interaction":"required","vuln_class":"open_redirect"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"cloudflare","cpe":[{"product":"workers-oauth-provider","vendor":"cloudflare"}],"cvss":{"score":6,"severity":"medium","source":"cna","vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:P/VC:H/VI:N/VA:N/SC:L/SI:N/SA:N/U:Amber","version":"4.0"},"cwes":[{"id":"CWE-601","name":"URL Redirection to Untrusted Site"}],"description":"The OAuth implementation in workers-oauth-provider that is part of  MCP framework https://github.com/cloudflare/workers-mcp , did not correctly validate that redirect_uri was on the allowed list of redirect URIs for the given client registration.\n\nFixed in:  https://github.com/cloudflare/workers-oauth-provider/pull/26 https://github.com/cloudflare/workers-oauth-provider/pull/26 \n\nImpact:\n\n \n\nUnder certain circumstances (see below), if a victim had previously authorized with a server built on workers-oath-provider, and an attacker could later trick the victim into visiting a malicious web site, then attacker could potentially steal the victim's credentials to the same OAuth server and subsequently impersonate them.\n\nIn order for the attack to be possible, the OAuth server's authorized callback must be designed to auto-approve authorizations that appear to come from an OAuth client that the victim has authorized previously. The authorization flow is not implemented by workers-oauth-provider; it is up to the application built on top to decide whether to implement such automatic re-authorization. However, many applications do implement such logic.\n\nNote: It is a basic, well-known requirement that OAuth servers should verify that the redirect URI is among the allowed list for the client, both during the authorization flow and subsequently when exchanging the authorization code for an access token. workers-oauth-provider implemented only the latter check, not the former. Unfortunately, the former is the much more important check. Readers who are familiar with OAuth may recognize that failing to check redirect URIs against the allowed list is a well-known, basic mistake, covered extensively in the RFC and elsewhere. The author of this library would like everyone to know that he was, in fact, well-aware of this requirement, thought about it a lot while designing the library, and then, somehow, forgot to actually make sure the check was in the code. That is, it's not that he didn't know what he was doing, it's that he knew what he was doing but flubbed it.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Missing validation of redirect_uri on authorize endpoint","id":"CVE-2025-4143","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"open_redirect","year":"2025"},"n_packages":2,"n_references":1,"next":{"headline":"PKCE bypass via downgrade attack","id":"CVE-2025-4144"},"packages":[{"ecosystem":"npm","fixed":["0.0.5"],"introduced":["0"],"last_affected":[],"package":"@cloudflare/workers-oauth-provider","purl":null,"source":"GHSA-4pc9-x2fx-p7vj"},{"ecosystem":"npm","fixed":["0.0.5"],"introduced":["0"],"last_affected":[],"package":"@cloudflare/workers-oauth-provider","purl":"pkg:npm/%40cloudflare/workers-oauth-provider","source":"GHSA-4pc9-x2fx-p7vj"}],"prev":{"headline":"Netgear EX6200 sub_3C8EC buffer overflow","id":"CVE-2025-4142"},"products":["cloudflare:workers-oauth-provider"],"published":"2025-05-01","related":[{"cvss_score":5.3,"headline":"PKCE bypass via downgrade attack","id":"CVE-2025-4144","kev_date_added":null,"published":"2025-05-01"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-05-01","vendors":["cloudflare"]},"summary":"Attackers can steal OAuth credentials via open redirect if the application auto-approves previously authorized clients, leading to account takeover.","url":"https://insights.sbomify.com/CVE-2025-4143/"}