cve.bz

CVE-2025-61928 better-auth better-auth: Improper Authorization

9.3 criticalEPSS 19%Fix available

Critical (9.3) in better-auth better-auth. EPSS 19% estimated probability of exploitation activity in the next 30 days. Fixed in better-auth 1.3.26.

On this page
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.

Severity

CVSS 4.0

9.3 critical
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
EPSS
19% (unchanged from 20% a week ago; 18% 30 days ago) estimated probability of exploitation activity in the next 30 days; 97th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: yes · Technical impact: total, assessed 2025-10-10. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-285 Improper Authorization
CWE-306 Missing Authentication for Critical Functionality
OWASP Top 10
A01:2025 Broken Access Control, A07:2025 Authentication Failures
Published
Modified
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Fix and patched versions

  • better-auth (npm): fixed in 1.3.26

Ask an AI about this CVE

Show the promptExplain CVE-2025-61928 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2025-61928?via=ask-ai-copy and https://cve.bz/cve/CVE-2025-61928?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2025-61928 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
better-auth< 1.3.26

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-99h5-pjcv-gr6vnpmbetter-auth<1.3.261.3.26

Detection rules

Ways to detect this CVE, not exploit code: the nuclei template that checks a system for it, and the Suricata and Snort rules that name it. A rule set may ship a rule turned off, so check yours by its sid.

  • Emerging Threats Open ET WEB_SPECIFIC_APPS better-auth Unauthenticated API Key Creation (CVE-2025-61928) sid 2065283

Attack patterns (CAPEC)

  • CAPEC-12 Choosing Message Identifier Likelihood: High · Severity: High
  • CAPEC-36 Using Unpublished Interfaces or Functionality Likelihood: Medium · Severity: High
  • CAPEC-62 Cross Site Request Forgery Likelihood: High · Severity: Very High
  • CAPEC-166 Force the System to Reset Values Severity: Medium
  • CAPEC-216 Communication Channel Manipulation

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-285 (16).

References

Check your stackJSON