Description
NextAuth.js provides authentication for Next.js. Prior to @auth/core 0.41.3 and next-auth 4.24.15 and 5.0.0-beta.32, the defaultNormalizer used by the email and magic-link sign-in flow validates an address before applying Unicode normalization. An address can contain a Unicode character such as U+FF20 FULLWIDTH COMMERCIAL AT that is not ASCII at-sign but canonicalizes to an ASCII at-sign under NFKC or NFKD normalization. The address passes the normalizer's single-at-sign check, but a downstream sendVerificationRequest mail library or delivery service that normalizes the address can then see two at-sign separators and deliver the passwordless sign-in link to an attacker-controlled recipient. Applications are affected when the email provider uses the built-in normalizer rather than a custom normalizeIdentifier and the downstream sender applies Unicode normalization. An attacker who knows a victim's email address can request the misrouted magic link and sign in as the victim without victim interaction. This issue is fixed in @auth/core 0.41.3 and next-auth 4.24.15 and 5.0.0-beta.32.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| nextauthjs | next-auth | < 4.24.15, >= 5.0.0-beta.4, < 5.0.0-beta.32 | — |
| @auth | core | >= 0.1.0, < 0.41.3 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Wolfi
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Wolfi rolling | jitsucom-jitsu-console | 2.11.0-r30 | — |
| Wolfi rolling | langfuse-3 +1 | 3.224.3-r0 | — |
| Wolfi rolling | langfuse-3-compat | 3.225.7-r6 | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| npm | @auth/core | >= 0.1.0, < 0.41.3 | 0.41.3 | GHSA-7rqj-j65f-68wh |
| npm | next-auth | >= 4.10.3, < 4.24.15 | 4.24.15 | GHSA-7rqj-j65f-68wh |
| npm | next-auth | >= 5.0.0-beta.1, < 5.0.0-beta.32 | 5.0.0-beta.32 | GHSA-7rqj-j65f-68wh |
References
- https://github.com/nextauthjs/next-auth/security/advisories/GHSA-7rqj-j65f-68wh
- https://github.com/nextauthjs/next-auth/commit/19d2feb24359fa8c79418907fc68d9ec8152ca94
- https://github.com/nextauthjs/next-auth/commit/a63eee12a1a20cb35209e44195b097868517b9a0
- https://github.com/nextauthjs/next-auth/releases/tag/@auth/core@0.41.3
- https://github.com/nextauthjs/next-auth/releases/tag/next-auth@4.24.15
- https://github.com/nextauthjs/next-auth/releases/tag/next-auth@5.0.0-beta.32