chore(deps): update dependency better-auth to v1.4.5 [security]#6238
chore(deps): update dependency better-auth to v1.4.5 [security]#6238renovate[bot] wants to merge 2 commits intomainfrom
Conversation
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
View your CI Pipeline Execution ↗ for commit 51af64e
☁️ Nx Cloud last updated this comment at |
e3d03c7 to
3c4e172
Compare
03055bf to
3e6b05f
Compare
ee19ecc to
e91a0ac
Compare
baf6cbc to
102ffe9
Compare
102ffe9 to
73be987
Compare
a322ca8 to
94d1aad
Compare
94d1aad to
72323c2
Compare
🚀 Changeset Version PreviewNo changeset entries found. Merging this PR will not cause a version bump for any packages. |
44aab81 to
63a2ed4
Compare
36c43ad to
ac09331
Compare
f4f0b9c to
63e49a9
Compare
2bb7786 to
4c15ad0
Compare
0142404 to
e37bf82
Compare
1ece2ab to
1978c9c
Compare
197f0f0 to
32e2456
Compare
32e2456 to
a4e5a15
Compare
a4e5a15 to
14adeb6
Compare
14adeb6 to
a78f4a8
Compare
…-Healing CI Rerun]
There was a problem hiding this comment.
Nx Cloud has identified a possible root cause for your failed CI:
This CI failure appears to be related to the environment or external dependencies rather than your code changes.
No code changes were suggested for this issue.
Trigger a rerun:
🎓 Learn more about Self-Healing CI on nx.dev
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. |
This PR contains the following updates:
1.3.27→1.4.5Better Auth affected by external request basePath modification DoS
GHSA-569q-mpph-wgww
More information
Details
Summary
Affected versions of Better Auth allow an external request to configure
baseURLwhen it isn’t defined through any other means. This can be abused to poison the router’s base path, causing all routes to return 404 for all users.This issue is only exploitable when
baseURLis not explicitly configured (e.g.,BETTER_AUTH_URLis missing) and the attacker is able to make the very first request to the server after startup. In properly configured environments or typical managed hosting platforms, this fallback behavior cannot be reached.Details
A combination of
X-Forwarded-HostandX-Forwarded-Protois implicitly trusted. This allows the first request to configure baseURL whenever it is not explicitly configured.Here's the code that reads the headers:
Here's the call to
getBaseURL(), the result is assigned toctx.baseURL.Here's the router receiving the poisoned
basePath:X-Forwarded-HostandX-Forwarded-Protocan be used to modify the pathname of a parsed URL object which formsbaseURL.basePathis then derived from the pathname ofbaseURL. Once the routerbasePathis poisoned it fails to match & route incoming requests.Repro
Start a better-auth server with no
baseURLconfiguration.Send the following request as the first request to the server:
The better-auth API check endpoint returns 404.
Now send a regular request without the
X-Forwarded-ProtoandX-Forwarded-Hostheaders.The better-auth API check endpoint still returns 404.
Example result
We have modified the
basePathfor the router until the server is restarted. An attacker can repeatedly send these attack requests aiming to persistently exploit the vulnerability.Severity
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:PReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Better Auth's rou3 Dependency has Double-Slash Path Normalization which can Bypass disabledPaths Config and Rate Limits
GHSA-x732-6j76-qmhm
More information
Details
Summary
An issue in the underlying router library rou3 can cause
/pathand//pathto be treated as identical routes. If your environment does not normalize incoming URLs (e.g., by collapsing multiple slashes), this can allow bypasses ofdisabledPathsand path-based rate limits.Details
Better Auth uses better-call, which internally relies on rou3 for routing. Affected versions of rou3 normalize paths by removing empty segments. As a result:
/sign-in/email//sign-in/email///sign-in/email…all resolve to the same route.
Some production setups automatically collapse multiple slashes. This includes:
In these environments and other configurations where
//pathreach Better Auth as/path, the issue does not apply.Fix
Updating rou3 to the latest version resolves the issue:
"rou3": "^0.5.1"(commit: https://github.com/h3js/rou3/commit/f60b43fa648399534507c9ac7db36d705b8874c3)
Better Auth recommends:
Impact
disabledPathsThe impact of bypassing disabled paths could vary based on a project's configuration.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
better-auth/better-auth (better-auth)
v1.4.5Compare Source
v1.4.4Compare Source
🚀 Features
🐞 Bug Fixes
View changes on GitHub
v1.4.3Compare Source
🚀 Features
🐞 Bug Fixes
View changes on GitHub
v1.4.2Compare Source
🚀 Features
/authforauth.ts- by @ping-maxwell in #6273 (53a74)🐞 Bug Fixes
View changes on GitHub
v1.4.1Compare Source
🚀 Features
🐞 Bug Fixes
generate-authenticate-optionsfrom POST to GET - by @mburumaxwell in #6199 (f922c)View changes on GitHub
v1.4.0Compare Source
🚀 Features
returnHeaderstogetSession- by @frectonz in #3983 (19d4b)storeStateStrategy- by @himself65 and Copilot in #5470 (b5f3b)search_pathconfiguration - by @okisdev in #5449 (bef33)getAdapter- by @himself65 in #5722 (10249)better-auth/minimal- by @bytaesu and @Bekacru in #5704 (1ebc6)cli- by @Kinfe123 and @himself65 in #4872 (70cb4)AuthClient- by @himself65 in #5815 (7caa2)disableSignalclient option - by @ping-maxwell in #6108 (f4c43)@standard-schema/spec- by @himself65 in #5629 (36315)generateOTP- by @ping-maxwell in #4723 (8ac4f)StripePlugintype - by @himself65 in #5509 (34431)🐞 Bug Fixes
Math.flooraround the division when calculating TTL - by @DevDuki, Dusan Misic, ping-maxwell and @himself65 in #4768 (14b9e)requestPasswordReset- by @Eazash in #5014 (2f94b)options.advanced.generateIdtype - by @himself65 (48249)node:async_hooksdirectly - by @himself65 in #5198 (0717e)whereof type TwoFactorWhereUniqueInput needs at least one ofidarguments - by @AlexStrNik in #5180 (2dab4)exactOptionalPropertyTypes- by @Kinfe123 and @himself65 in #5236 (f2723)ssoClientexport from client plugin - by @Kinfe123 in #5307 (ee229)HookEndpointContextandInternalContext- by @himself65 in #5359 (89475)shatobranchand made itcanaryby default - by @max-programming in #5491 (5bc26)deleteUser- by @ping-maxwell in #5553 (216dc)undefinedtype for optional property types - by @himself65 in #5654 (b6d40)string[]inference for additionalFields - by @GautamBytes in #5778 (414d0)Configuration
📅 Schedule: (UTC)
🚦 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.