Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Oct 9, 2025

This PR contains the following updates:

Package Change Age Confidence
better-auth (source) 1.3.7 -> 1.3.26 age confidence

GitHub Vulnerability Alerts

CVE-2025-61928

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 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.

PoC

curl -X POST http://localhost:3000/api/auth/api-key/create \
   -H 'Content-Type: application/json' \
   -d '{
         "userId": "victim-user-id",
         "name": "zeropath"
       }'

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
  • [security] api keys should properly check if a request is from client or server  -  by @​Bekacru (55608)
  • api-key: Shouldn't issue api key a mock session by default  -  by @​Bekacru (a49e5)
    View changes on GitHub

v1.3.25

Compare Source

   🚀 Features
   🐞 Bug Fixes
   🏎 Performance
    View changes on GitHub

v1.3.24

Compare Source

   🚀 Features
   🐞 Bug Fixes
   🏎 Performance
    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
    View changes on GitHub

v1.3.18

Compare Source

   🐞 Bug Fixes
    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
    View changes on GitHub

v1.3.13

Compare Source

   🚀 Features
   🐞 Bug Fixes
    View changes on GitHub

v1.3.12

Compare Source

   🚀 Features
   🐞 Bug Fixes
    View changes on GitHub

v1.3.11

Compare Source

   🚀 Features
   🐞 Bug Fixes
    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
    View changes on GitHub

v1.3.9

Compare Source

   🚀 Features
   🐞 Bug Fixes
    View changes on GitHub

v1.3.8

Compare Source

   🚀 Features

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.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@safedep
Copy link

safedep bot commented Oct 9, 2025

SafeDep Report Summary

Yellow Malicious Packages Badge Green Vulnerable Packages Badge Green Risky License Badge

⚠ 1 packages are identified as suspicious, human review is recommended.

Package Details
Package Malware Vulnerability Risky License Report
icon better-auth @ 1.3.26
pnpm-lock.yaml
warning icon
ok icon
ok icon
🔗
icon @better-auth/core @ 1.3.26
pnpm-lock.yaml
ok icon
ok icon
ok icon
🔗
icon @better-auth/utils @ 0.3.0
pnpm-lock.yaml
ok icon
ok icon
ok icon
🔗
icon @napi-rs/wasm-runtime @ 1.0.7
pnpm-lock.yaml
ok icon
ok icon
ok icon
🔗
icon @noble/ciphers @ 2.0.1
pnpm-lock.yaml
ok icon
ok icon
ok icon
🔗
icon @noble/hashes @ 2.0.1
pnpm-lock.yaml
ok icon
ok icon
ok icon
🔗
icon @oxc-project/types @ 0.95.0
pnpm-lock.yaml
ok icon
ok icon
ok icon
🔗
icon @rolldown/binding-android-arm64 @ 1.0.0-beta.44
pnpm-lock.yaml
ok icon
ok icon
ok icon
🔗
icon @rolldown/binding-darwin-arm64 @ 1.0.0-beta.44
pnpm-lock.yaml
ok icon
ok icon
ok icon
🔗
icon @rolldown/binding-darwin-x64 @ 1.0.0-beta.44
pnpm-lock.yaml
ok icon
ok icon
ok icon
🔗
icon @rolldown/binding-freebsd-x64 @ 1.0.0-beta.44
pnpm-lock.yaml
ok icon
ok icon
ok icon
🔗
icon @rolldown/binding-linux-arm-gnueabihf @ 1.0.0-beta.44
pnpm-lock.yaml
ok icon
ok icon
ok icon
🔗
icon @rolldown/binding-linux-arm64-gnu @ 1.0.0-beta.44
pnpm-lock.yaml
ok icon
ok icon
ok icon
🔗
icon @rolldown/binding-linux-arm64-musl @ 1.0.0-beta.44
pnpm-lock.yaml
ok icon
ok icon
ok icon
🔗
icon @rolldown/binding-linux-x64-gnu @ 1.0.0-beta.44
pnpm-lock.yaml
ok icon
ok icon
ok icon
🔗
icon @rolldown/binding-linux-x64-musl @ 1.0.0-beta.44
pnpm-lock.yaml
ok icon
ok icon
ok icon
🔗
icon @rolldown/binding-openharmony-arm64 @ 1.0.0-beta.44
pnpm-lock.yaml
ok icon
ok icon
ok icon
🔗
icon @rolldown/binding-wasm32-wasi @ 1.0.0-beta.44
pnpm-lock.yaml
ok icon
ok icon
ok icon
🔗
icon @rolldown/binding-win32-arm64-msvc @ 1.0.0-beta.44
pnpm-lock.yaml
ok icon
ok icon
ok icon
🔗
icon @rolldown/binding-win32-ia32-msvc @ 1.0.0-beta.44
pnpm-lock.yaml
ok icon
ok icon
ok icon
🔗
icon @rolldown/binding-win32-x64-msvc @ 1.0.0-beta.44
pnpm-lock.yaml
ok icon
ok icon
ok icon
🔗
icon @rolldown/pluginutils @ 1.0.0-beta.44
pnpm-lock.yaml
ok icon
ok icon
ok icon
🔗
icon jose @ 6.1.0
pnpm-lock.yaml
ok icon
ok icon
ok icon
🔗
icon nanostores @ 1.0.1
pnpm-lock.yaml
ok icon
ok icon
ok icon
🔗
icon rolldown @ 1.0.0-beta.44
pnpm-lock.yaml
ok icon
ok icon
ok icon
🔗

This report is generated by SafeDep Github App

@renovate renovate bot force-pushed the renovate/npm-better-auth-vulnerability branch from 3e50cf5 to d3815b9 Compare October 21, 2025 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant