{"answers":{"affected":"2 open source packages ship an affected version, including better-auth.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-61928 exists.","fix":"Upgrade better-auth to 1.3.26 or later.","what":"CVE-2025-61928 is a critical authentication bypass vulnerability in better-auth, published on 9 Oct 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-61928 and fix it if it is affected.\n\nWhat it is: CVE-2025-61928 is a critical authentication bypass vulnerability in better-auth, published on 9 Oct 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-61928 exists.\n\nAffected packages and fixed versions:\n- better-auth (npm): affected all versions; fixed in 1.3.26\n- better-auth (npm): affected all versions; fixed in 1.3.26\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-61928/ (Markdown: https://insights.sbomify.com/CVE-2025-61928/index.md)","id":"CVE-2025-61928","markdown":"https://insights.sbomify.com/CVE-2025-61928/index.md","name":"CVE-2025-61928","record":{"aliases":["GHSA-99h5-pjcv-gr6v"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["account_takeover","privilege_escalation"],"network_reachable":"yes","non_default_config":false,"product_category":"TypeScript authentication library","requires_auth":"none","summary":"Unauthenticated attackers can create API keys for any user by manipulating request parameters, leading to full account takeover and privilege escalation.","user_interaction":"not_required","vuln_class":"auth_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":9.3,"severity":"critical","source":"cna","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","version":"4.0"},"cwes":[{"id":"CWE-306","name":"Missing Authentication for Critical Functionality"},{"id":"CWE-285","name":"Improper Authorization"}],"description":"Better Auth is an authentication and authorization library for TypeScript. In versions prior to 1.3.26, unauthenticated attackers can create or modify API keys for any user by passing that user's id in the request body to the `api/auth/api-key/create` route. `session?.user ?? (authRequired ? null : { id: ctx.body.userId })`. When no session exists but `userId` is present in the request body, `authRequired` becomes false and the user object is set to the attacker-controlled ID. Server-only field validation only executes when `authRequired` is true (lines 280-295), allowing attackers to set privileged fields. No additional authentication occurs before the database operation, so the malicious payload is accepted. The same pattern exists in the update endpoint. This is a critical authentication bypass enabling full an unauthenticated attacker can generate an API key for any user and immediately gain complete authenticated access. This allows the attacker to perform any action as the victim user using the api key, potentially compromise the user data and the application depending on the victim's privileges. Version 1.3.26 contains a patch for the issue.","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":"Better Auth: Unauthenticated API key creation through api-key plugin","id":"CVE-2025-61928","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"auth_bypass","year":"2025"},"n_packages":2,"n_references":2,"next":{"headline":"Cherry Studio allows one-click on a specific URL to cause a command to execute","id":"CVE-2025-61929"},"packages":[{"ecosystem":"npm","fixed":["1.3.26"],"introduced":["0"],"last_affected":[],"package":"better-auth","purl":null,"source":"GHSA-99h5-pjcv-gr6v"},{"ecosystem":"npm","fixed":["1.3.26"],"introduced":["0"],"last_affected":[],"package":"better-auth","purl":"pkg:npm/better-auth","source":"GHSA-99h5-pjcv-gr6v"}],"prev":{"headline":"Happy-DOM has VM Context Escape","id":"CVE-2025-61927"},"products":["better-auth"],"published":"2025-10-09","related":[],"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":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-10-10","vendors":["better-auth"]},"summary":"Unauthenticated attackers can create API keys for any user by manipulating request parameters, leading to full account takeover and privilege escalation.","url":"https://insights.sbomify.com/CVE-2025-61928/"}