CVE Explorer
CVE-2025-61928
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
Known exploited
Not asserted
Disputed
No
Stale source
No
Conflicts
1
Preserved source conflicts
No provider value was silently selected as the winner.
cwe · 2 assertions
{"cweId":"CWE-285","description":"CWE-285: Improper Authorization","lang":"en","type":"CWE"}
- cve_program_cvelist_v5cweurn:baitaphish:normalized-source-record:v2:4041cc04617f36a99dd837fe82019cba555f8e337d34a0fea9693ffd8613fdb5 · sha256:8dbd709acbfdf3d2… · /containers/cna/problemTypes/0/descriptions/0
{"cweId":"CWE-306","description":"CWE-306: Missing Authentication for Critical Function","lang":"en","type":"CWE"}
- cve_program_cvelist_v5cweurn:baitaphish:normalized-source-record:v2:4041cc04617f36a99dd837fe82019cba555f8e337d34a0fea9693ffd8613fdb5 · sha256:8dbd709acbfdf3d2… · /containers/cna/problemTypes/1/descriptions/0
Affected products and versions
1 source assertion{"product":"better-auth","vendor":"better-auth","versions":[{"status":"affected","version":"< 1.3.26"}]}
- cve_program_cvelist_v5affectedurn:baitaphish:normalized-source-record:v2:4041cc04617f36a99dd837fe82019cba555f8e337d34a0fea9693ffd8613fdb5 · sha256:8dbd709acbfdf3d2… · /containers/cna/affected/0
Provider-owned CVSS observations
1 source assertion{"metric":{"attackComplexity":"LOW","attackRequirements":"NONE","attackVector":"NETWORK","baseScore":9.3,"baseSeverity":"CRITICAL","privilegesRequired":"NONE","subAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","userInteraction":"NONE","vectorString":"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","vulnAvailabilityImpact":"HIGH","vulnConfidentialityImpact":"HIGH","vulnIntegrityImpact":"HIGH"},"metric_type":"cvssV4_0"}
- cve_program_cvelist_v5cvssurn:baitaphish:normalized-source-record:v2:4041cc04617f36a99dd837fe82019cba555f8e337d34a0fea9693ffd8613fdb5 · sha256:8dbd709acbfdf3d2… · /containers/cna/metrics/0/cvssV4_0
CWE assertions
2 source assertions{"cweId":"CWE-285","description":"CWE-285: Improper Authorization","lang":"en","type":"CWE"}
- cve_program_cvelist_v5cweurn:baitaphish:normalized-source-record:v2:4041cc04617f36a99dd837fe82019cba555f8e337d34a0fea9693ffd8613fdb5 · sha256:8dbd709acbfdf3d2… · /containers/cna/problemTypes/0/descriptions/0
{"cweId":"CWE-306","description":"CWE-306: Missing Authentication for Critical Function","lang":"en","type":"CWE"}
- cve_program_cvelist_v5cweurn:baitaphish:normalized-source-record:v2:4041cc04617f36a99dd837fe82019cba555f8e337d34a0fea9693ffd8613fdb5 · sha256:8dbd709acbfdf3d2… · /containers/cna/problemTypes/1/descriptions/0
Source references
3 source assertions{"name":"https://github.com/better-auth/better-auth/commit/556085067609c508f8c546ceef9003ee8c607d39","tags":["x_refsource_MISC"],"url":"https://github.com/better-auth/better-auth/commit/556085067609c508f8c546ceef9003ee8c607d39"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:4041cc04617f36a99dd837fe82019cba555f8e337d34a0fea9693ffd8613fdb5 · sha256:8dbd709acbfdf3d2… · /containers/cna/references/1
{"name":"https://github.com/better-auth/better-auth/security/advisories/GHSA-99h5-pjcv-gr6v","tags":["x_refsource_CONFIRM"],"url":"https://github.com/better-auth/better-auth/security/advisories/GHSA-99h5-pjcv-gr6v"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:4041cc04617f36a99dd837fe82019cba555f8e337d34a0fea9693ffd8613fdb5 · sha256:8dbd709acbfdf3d2… · /containers/cna/references/0
{"tags":["exploit"],"url":"https://github.com/better-auth/better-auth/security/advisories/GHSA-99h5-pjcv-gr6v"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:4041cc04617f36a99dd837fe82019cba555f8e337d34a0fea9693ffd8613fdb5 · sha256:8dbd709acbfdf3d2… · /containers/adp/0/references/0
Attribution and limitations
- CVE Program CVEList V5: Reproduce the MITRE copyright designation and CVE license in copies. Source →
Provider severity values are preserved separately. Baitaphish does not convert them into a risk rating, infer affected products, or treat EPSS as observed exploitation.