fix(security): bump @auth/pg-adapter so @auth/core reaches patched 0.41.3 - #276
Merged
Conversation
…d 0.41.3 Bumping next-auth to beta.32 (#260) fixed the next-auth advisories but left one critical open. beta.32 ships its own nested @auth/core@0.41.3, while @auth/pg-adapter@1.11.2 depends on EXACTLY @auth/core@0.41.2 — the vulnerable copy — and that is the one hoisted to the top of node_modules. @auth/pg-adapter@1.11.3 requires 0.41.3, so the tree collapses to a single patched @auth/core. Advisories cleared: the Unicode-normalisation email normalizer bypass (critical), getToken() throwing on a malformed Bearer header (high), and OAuth state/nonce/PKCE cookies not bound to the transaction (medium). Verified: only one @auth/core remains in the lockfile at 0.41.3, and typecheck is clean. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why
#260 (next-auth → beta.32) cleared the next-auth advisories but left one critical open, because the vulnerable package survived one level down:
next-auth@beta.32carries its own patched nested copy, so the advisory looked half-fixed — but@auth/pg-adapter@1.11.2pins@auth/coreto exactly0.41.2, and that copy is the one hoisted to the top ofnode_modules.@auth/pg-adapter@1.11.3requires0.41.3, which collapses the tree to a single patched copy.Advisories cleared
getToken()throws an uncaught exception on a malformed Bearer headerstate/nonce/PKCE check cookies not bound to the transactionThis takes the repo's open Dependabot alerts from 10 (3 critical) → 3, with zero critical remaining.
Verification
@auth/core, at0.41.3— the duplicate nested copy is gone.npm run typecheck— clean (0 errors), which matters here because the adapter implements theAdapterinterface from@auth/core./api/auth/providersand/api/auth/csrfboth 200.🤖 Generated with Claude Code