{"answers":{"affected":"2 open source packages ship an affected version, including better-auth. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-27143 exists.","fix":"Upgrade better-auth to 1.1.20 or later.","what":"CVE-2025-27143 is a medium-severity vulnerability in better-auth, published on 24 Feb 2025. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2025-27143 and fix it if it is affected.\n\nWhat it is: CVE-2025-27143 is a medium-severity vulnerability in better-auth, published on 24 Feb 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-27143 exists.\n\nAffected packages and fixed versions:\n- better-auth (npm): affected all versions; fixed in 1.1.20\n- better-auth (npm): affected all versions; fixed in 1.1.20\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-27143/ (Markdown: https://insights.sbomify.com/CVE-2025-27143/index.md)","id":"CVE-2025-27143","markdown":"https://insights.sbomify.com/CVE-2025-27143/index.md","name":"CVE-2025-27143","record":{"aliases":["GHSA-hjpm-7mrm-26w8"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["security_bypass","account_takeover"],"network_reachable":"yes","non_default_config":false,"product_category":"TypeScript auth library","requires_auth":"none","summary":"Attackers can redirect users to malicious sites via scheme-less URLs in Better Auth, enabling phishing or token theft.","user_interaction":"not_required","vuln_class":"open_redirect"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"better_auth","vendor":"better-auth"}],"cvss":{"score":6.9,"severity":"medium","source":"cna","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","version":"4.0"},"cwes":[{"id":"CWE-601","name":"URL Redirection to Untrusted Site"}],"description":"Better Auth is an authentication and authorization library for TypeScript. Prior to version 1.1.21, the application is vulnerable to an open redirect due to improper validation of the callbackURL parameter in the email verification endpoint and any other endpoint that accepts callback url. While the server blocks fully qualified URLs, it incorrectly allows scheme-less URLs. This results in the browser interpreting the URL as a fully qualified URL, leading to unintended redirection. An attacker can exploit this flaw by crafting a malicious verification link and tricking users into clicking it. Upon successful email verification, the user will be automatically redirected to the attacker's website, which can be used for phishing, malware distribution, or stealing sensitive authentication tokens. This CVE is a bypass of the fix for GHSA-8jhw-6pjj-8723/CVE-2024-56734. Version 1.1.21 contains an updated patch.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Beter Auth has an Open Redirect via Scheme-Less Callback Parameter","id":"CVE-2025-27143","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"open_redirect","year":"2025"},"n_packages":2,"n_references":5,"next":{"headline":"Go JOSE's Parsing Vulnerable to Denial of Service","id":"CVE-2025-27144"},"packages":[{"ecosystem":"npm","fixed":["1.1.20"],"introduced":["0"],"last_affected":[],"package":"better-auth","purl":null,"source":"GHSA-hjpm-7mrm-26w8"},{"ecosystem":"npm","fixed":["1.1.20"],"introduced":["0"],"last_affected":[],"package":"better-auth","purl":"pkg:npm/better-auth","source":"GHSA-hjpm-7mrm-26w8"}],"prev":{"headline":"LocalSend path traversal vulnerability in the file upload endpoint allows nearby devices to execute arbitrary commands","id":"CVE-2025-27142"},"products":["better-auth"],"published":"2025-02-24","related":[{"cvss_score":9.1,"headline":"Better Auth: OAuth refresh-token replay via missing client authentication on oidc-provider and mcp plugins","id":"CVE-2026-53512","kev_date_added":null,"published":"2026-07-15"},{"cvss_score":8.3,"headline":"Better Auth: Account takeover via OAuth auto-link to unverified pre-registered email","id":"CVE-2026-53516","kev_date_added":null,"published":"2026-07-15"},{"cvss_score":7.9,"headline":"Better Auth has an Open Redirect Vulnerability in Verify Email Endpoint","id":"CVE-2024-56734","kev_date_added":null,"published":"2024-12-30"},{"cvss_score":7.7,"headline":"Better Auth: Unauthorized invitation acceptance via unverified email match in organization plugin","id":"CVE-2026-53514","kev_date_added":null,"published":"2026-07-15"},{"cvss_score":7.6,"headline":"Better Auth: Device authorization approve and deny accept any authenticated session while the user code is pending","id":"CVE-2026-45337","kev_date_added":null,"published":"2026-07-15"}],"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":"yes","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-02-25","vendors":["better-auth"]},"summary":"Attackers can redirect users to malicious sites via scheme-less URLs in Better Auth, enabling phishing or token theft.","url":"https://insights.sbomify.com/CVE-2025-27143/"}