fix(deps): update dependency better-auth to v1.3.26 [security] - autoclosed #1416
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
1.3.8
->1.3.26
GitHub Vulnerability Alerts
GHSA-99h5-pjcv-gr6v
Summary
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.Details
The vulnerability exists in the authentication logic at when checking for user authentication then derives the user as
session?.user ?? (authRequired ? null : { id: ctx.body.userId })
. When no session exists butuserId
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 whenauthRequired
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.PoC
Response contains the new API key whose userId matches the victim, confirming the bypass.
Impact
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.
This issue was found by ZeroPath.
Release Notes
better-auth/better-auth (better-auth)
v1.3.26
Compare Source
🐞 Bug Fixes
View changes on GitHub
v1.3.25
Compare Source
🚀 Features
cli
- by @Kinfe123 and @himself65 in #4872 (e1082)🐞 Bug Fixes
requestPasswordReset
- by @Eazash in #5014 (d6224)null
- by @ping-maxwell in #5036 (84e99)getCustomerCreateParams
not actually being called - by @ebalo55 and @himself65 in #5019 (cdd6f)🏎 Performance
View changes on GitHub
v1.3.24
Compare Source
🚀 Features
🐞 Bug Fixes
onDelete
is ignored - by @himself65 in #4973 (aba9a)🏎 Performance
Auth
- by @himself65 in #4930 (574b9)View changes on GitHub
v1.3.23
Compare Source
v1.3.22
Compare Source
v1.3.21
Compare Source
v1.3.20
Compare Source
v1.3.19
Compare Source
🐞 Bug Fixes
getSession
shouldn't exposeoptions
andpath
types - by @Bekacru in #4947 (633a7)View changes on GitHub
v1.3.18
Compare Source
🐞 Bug Fixes
Set-Cookie
header - by @frectonz in #4388 (15b00)View changes on GitHub
v1.3.17
Compare Source
🚀 Features
🐞 Bug Fixes
View changes on GitHub
v1.3.16
Compare Source
No significant changes
View changes on GitHub
v1.3.15
Compare Source
🐞 Bug Fixes
View changes on GitHub
v1.3.14
Compare Source
🚀 Features
🐞 Bug Fixes
Math.floor
around the division when calculating TTL - by @DevDuki, Dusan Misic, ping-maxwell and @himself65 in #4768 (08da9)ctx
to DB hooks - by @ping-maxwell in #4769 (39c21)beforeCreateOrganization
- by @ping-maxwell in #4765 (25a43)View changes on GitHub
v1.3.13
Compare Source
🚀 Features
returnHeaders
togetSession
- by @frectonz in #3983 (8a4b3)🐞 Bug Fixes
autoCreateOnSignUp
option as it's not implemented yet - by @Bekacru in #4755 (21bd4)email
from query - by @himself65 in #4740 (8709a)View changes on GitHub
v1.3.12
Compare Source
🚀 Features
generateOTP
- by @ping-maxwell in #4723 (11dbf)🐞 Bug Fixes
View changes on GitHub
v1.3.11
Compare Source
🚀 Features
🐞 Bug Fixes
errorCallbackURL
in failed oauth flows - by @frectonz in #4650 (43545)init
- by @LightTab2 and @himself65 in #4680 (9d216)View changes on GitHub
v1.3.10
Compare Source
Maintenance update: We fixed lots of issues from the community. Thanks to everyone for contributing to better-auth.
🚀 Features
🐞 Bug Fixes
refreshTokenExpiresAt
- by @himself65 in #4569 (cc007)dontRememberMe
mode - by @frectonz in #4558 (acb28)method
- by @himself65 in #4595 (60930)unknown
by default - by @himself65 in #4596 (78250)global.crypto
- by @himself65 in #4606 (ef450)onMount
- by @frectonz in #4669 (9d6e4)info
shows the correct version - by @himself65 in #4547 (7faae)window.crypto
is undefined - by @himself65 in #4620 (7dbc5)checkRolePermission
shouldn't be a promise - by @ping-maxwell in #4533 (abfc4)client_secrect
from authorizationUrl - by @arslan2012 in #4511 (71aeb)View changes on GitHub
v1.3.9
Compare Source
🚀 Features
🐞 Bug Fixes
node:sqlite
- by @himself65 in #4415 (14ad4)iat
for/token
endpoint - by @dvanmali in #4501 (8f80a)/api/auth
fromwwwAuthenticateValue
and properly format the header - by @paoloricciuti in #4462 (4b364)base64.encode
- by @himself65 in #4527 (4ebc6)client_key
- by @Manokii in #4437 (d8145)View changes on GitHub
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.