CVE-2025-61928
highPriorität · verfolgen · 7OT-Risiko · erhöhtEPSS 0.188 · 97. PerzentilEUUSEPSS · bewertet 2026-10-27
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.
cvss
Technischer Schweregrad, 0–10. Eine Zeile je Quelle.
Basiswert 0–10 · höher = schwerwiegender · Vektor überfahren zum Auflösen⚠ Quellen uneinig · high–critical · 8.1–9.3
SSVC
Eine Handlungsentscheidung — aus Ausnutzung und Auswirkung.
schwächen
Die CWE-Schwächeklassen, zu denen dies gehört.
betroffene Produkte (2)
Betroffene Produkte und Versionsbereiche.
Advisories (1)
Hersteller- und Ökosystem-Meldungen dazu.
- GHSA-99h5-pjcv-gr6vBetter Auth: Unauthenticated API key creation through api-key plugin2025-10-09ghsa · osvUS
### **Summary** A critical authentication bypass was identified in the API key creation and update endpoints. An attacker could create or modify API keys for arbitrary users by supplying a victim’s user ID in the request body. Due to a flaw in how the authenticated user was derived, the endpoints could treat attacker-controlled input as an authenticated user object under certain conditions. ### **Details** The vulnerability originated from fallback logic used when determining the current user. When no session was present, the handler incorrectly allowed request-body data to populate the user context used for authorization decisions. Because server-side validation only executed when authentication was required, privileged fields were not properly protected. As a result, the API accepted unauthenticated requests that targeted other users. This same pattern affected both the API key creation and update routes. ### **Impact** Unauthenticated attackers could generate or modify API keys belonging to any user. This granted full authenticated access as the targeted user and, depending on the user’s privileges, could lead to account compromise, access to sensitive data, or broader application takeover.
auch bekannt als (3)
Weitere Namen und Kennungen dieser Entität.
quellen
Welche Quellen diesen Datensatz belegen und wann.
Referenzen (7)
Externe Belege — Patches, Meldungen, Analysen.
- https://github.com/better-auth/better-auth/commit/556085067609c508f8c546ceef9003ee8c607d39cnnvd
- https://github.com/better-auth/better-auth/releasesPatchcnnvd
- https://github.com/better-auth/better-auth/security/advisories/GHSA-99h5-pjcv-gr6vcnnvd
- https://github.com/better-auth/better-auth/commit/556085067609c508f8c546ceef9003ee8c607d39enisa_euvd
- https://github.com/better-auth/better-auth/security/advisories/GHSA-99h5-pjcv-gr6venisa_euvd
- https://github.com/better-auth/better-auth/commit/556085067609c508f8c546ceef9003ee8c607d39nvd
- https://github.com/better-auth/better-auth/security/advisories/GHSA-99h5-pjcv-gr6vnvd
Angreifer nutzen Schwachstellen wie diese gegen im Internet exponierte Dienste aus. Sehen Sie mit einem kostenlosen Passiv-Scan, was exponiert ist.
Kostenloser Scan