Vulnerabilities in pkg:npm/next-auth

PACKAGE
Advisory Identifier: GHSA-x445-f3h2-j279
Advisory Summary

CVE-2026-73419 is a MODERATE (CVSS 6.8) oauth state, nonce, and pkce vulnerability (CWE-940: Improper Verification of Source of a Communication Channel) affecting @auth/core libraries in the npm ecosystem. The issue involves oauth state, nonce, and pkce check cookies are not bound to the provider that created them. Remediation is available by upgrading affected packages to version 0.41.3, 5.0.0-beta.32, 4.24.15.

14 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/next-auth

14 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/next-auth. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-x445-f3h2-j279 CVE-2026-73419 MODERATE Auth.js: OAuth state, nonce, and PKCE check cookies are not bound to the provider that created them
GHSA-xmf8-cvqr-rfgj CVE-2026-73418 HIGH Auth.js: getToken() throws an uncaught exception on malformed Bearer authorization headers
GHSA-8fpg-xm3f-6cx3 CVE-2026-73421 CRITICAL Auth.js: Configuration errors can cause existence-based auth checks to fail open (auth object populated with an error)
GHSA-7rqj-j65f-68wh CVE-2026-73420 CRITICAL Auth.js: Email normalizer validates the address before Unicode normalization, allowing a homoglyph @ bypass
GHSA-5jpx-9hw9-2fx4 - MODERATE NextAuthjs Email misdelivery Vulnerability
GHSA-v64w-49xw-qq89 CVE-2023-48309 MODERATE Possible user mocking that bypasses basic authentication
GHSA-7r7x-4c4q-c4qf CVE-2023-27490 HIGH Missing proper state, nonce and PKCE checks for OAuth authentication
GHSA-xv97-c62v-4587 CVE-2022-35924 CRITICAL NextAuth.js before 4.10.3 and 3.29.10 sending verification requests (magic link) to unwanted emails
GHSA-p6mm-27gq-9v3p CVE-2022-31186 LOW next-auth before v4.10.2 and v3.29.9 leaks excessive information into log
GHSA-g5fm-jp9v-2432 CVE-2022-31093 HIGH Improper Handling of `callbackUrl` parameter in next-auth
GHSA-pgjx-7f9g-9463 CVE-2022-31127 HIGH Improper handling of email input
GHSA-q2mx-j4x2-2h74 CVE-2022-29214 MODERATE URL Redirection to Untrusted Site ('Open Redirect') in next-auth
GHSA-f9wg-5f46-cjmw CVE-2022-24858 MODERATE NextAuth.js default redirect callback vulnerable to open redirects
GHSA-pg53-56cg-4m8q CVE-2021-21310 LOW Token verification bug in next-auth

CVE-2026-73419 at a Glance

CVE Identifier CVE-2026-73419
GHSA Identifier GHSA-x445-f3h2-j279
Severity MODERATE
CVSS v3.1 Base Score 6.8
CWE Classification CWE-940: Improper Verification of Source of a Communication Channel
Affected Product @auth/core
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 6.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2026-73419

To remediate this vulnerability, upgrade all affected @auth/core dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@auth/core fixed: 0.41.3
npm install @auth/core@0.41.3
next-auth fixed: 5.0.0-beta.32
npm install next-auth@5.0.0-beta.32
next-auth fixed: 4.24.15
npm install next-auth@4.24.15
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @auth/core

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-73419, inspect your project dependencies using npm:

npm ls @auth/core

Analyze the terminal output to locate any version of @auth/core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.41.3), your application is affected.

Note: The npm ls @auth/core command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-940: Improper Verification of Source of a Communication Channel, where the product establishes a communication channel to handle an incoming request that has been initiated by an actor, but it does not properly verify that the request is coming from the expected origin. In @auth/core, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary Auth.js stores the OAuth/OIDC anti-CSRF checks (`state`, `nonce`, and the PKCE verifier) in global cookies that are not bound to the provider that created them. On callback, a check value minted during a sign-in started with one provider can satisfy the callback for a different provider, because the stored cookie is not verified against the callback provider's identity (provider id, issuer, client id, or redirect URI). In a multi-provider app that allows account linking while logged in, this provider-confusion / mix-up condition can let an attacker link their account at a second provider to a victim's user. ## Am I affected? You may be affected if **all** of the following hold: - You use `next-auth` `<= 4.24.14` or `>= 5.0.0-beta.1, <= 5.0.0-beta.31`, or `@auth/core` `<= 0.41.2`. - You configure multiple OAuth/OIDC providers. - You allow users to link additional providers while logged in. - At least one configured provider's authorization request is observable by an attacker, and at least one target provider's callback can be satisfied without a PKCE verifier (i.e. it relies only on `state` or only on `nonce`). You are **not** affected if you use a single OAuth provider, do not allow logged-in account linking, or all providers enforce PKCE. ## Impact - Account-linking confusion: an attacker can get their account at a target provider linked to the victim's Auth.js user, granting the attacker persistent sign-in to the victim's account through that linked provider. - Exploitation requires luring the victim into starting a legitimate same-origin flow; it cannot be performed by cross-site request forgery alone, which reduces practical likelihood. ## Patched version The fix binds the OAuth check cookies to the provider/authorization flow that created them, so a callback cannot consume a check value minted for a different provider. Upgrade to the first releases containing this fix (pending; this advisory will be updated with exact patched versions before publication). ## Workarounds If you cannot upgrade immediately: - Enable PKCE (`checks: ["pkce"]`, in addition to `state`/`nonce`) on every provider that supports it; PKCE blocks the practical code-swap variant because the attacker cannot observe the relying party's verifier. - Avoid offering logged-in account linking across multiple providers where one provider is lower-trust or attacker-observable. - Treat `events.linkAccount` as sensitive: add audit logging, user notification, or out-of-band confirmation so that any unexpected link is visible (defense-in-depth, not a root-cause fix). ## Credit Reported by @Nadav0077. Thank you for the responsible disclosure.

CVE-2026-73419 Affected @auth/core Versions

3 component(s)
Fixed Versions:
0.41.35.0.0-beta.324.24.15
Product / Package Ecosystem Affected Versions Fixed Version
@auth/core
npm
< 0.41.3
0.41.3
next-auth
npm
≥ 5.0.0-beta.1
< 5.0.0-beta.32
5.0.0-beta.32
next-auth
npm
< 4.24.15
4.24.15

References

Frequently Asked Questions

What is CVE-2026-73419?
CVE-2026-73419 is a security vulnerability in @auth/core involving OAuth state, nonce, and PKCE check cookies are not bound to the provider that created them under CWE-940: Improper Verification of Source of a Communication Channel.
Which @auth/core versions are affected?
Affected versions include releases prior to 0.41.3, 5.0.0-beta.32, 4.24.15 across affected packages: @auth/core, next-auth.
What version fixes CVE-2026-73419?
Upgrading to 0.41.3, 5.0.0-beta.32, 4.24.15 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @auth/core affected?
Yes, @auth/core is affected in releases prior to 0.41.3. Upgrade your dependency to 0.41.3 or later.
Is next-auth affected?
Yes, next-auth is affected in releases prior to 5.0.0-beta.32, 4.24.15. Upgrade your dependency to 5.0.0-beta.32, 4.24.15 or later.
What is the CVSS score of CVE-2026-73419?
CVE-2026-73419 has a CVSS v3.1 base score of 6.8 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2026-73419?
CVE-2026-73419 is classified under CWE-940: Improper Verification of Source of a Communication Channel (The product establishes a communication channel to handle an incoming request that has been initiated by an actor, but it does not properly verify that the request is coming from the expected origin.).
How can I check npm dependencies for CVE-2026-73419?
Run the dependency tree command: 'npm ls @auth/core'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-x445-f3h2-j279",
  "modified" : "2026-08-13T19:05:32Z",
  "published" : "2026-07-23T14:31:51Z",
  "aliases" : [ "CVE-2026-73419" ],
  "summary" : "Auth.js: OAuth state, nonce, and PKCE check cookies are not bound to the provider that created them",
  "details" : "## Summary\n\nAuth.js stores the OAuth/OIDC anti-CSRF checks (`state`, `nonce`, and the PKCE verifier) in global cookies that are not bound to the provider that created them. On callback, a check value minted during a sign-in started with one provider can satisfy the callback for a different provider, because the stored cookie is not verified against the callback provider's identity (provider id, issuer, client id, or redirect URI). In a multi-provider app that allows account linking while logged in, this provider-confusion / mix-up condition can let an attacker link their account at a second provider to a victim's user.\n\n## Am I affected?\n\nYou may be affected if **all** of the following hold:\n\n- You use `next-auth` `<= 4.24.14` or `>= 5.0.0-beta.1, <= 5.0.0-beta.31`, or `@auth/core` `<= 0.41.2`.\n- You configure multiple OAuth/OIDC providers.\n- You allow users to link additional providers while logged in.\n- At least one configured provider's authorization request is observable by an attacker, and at least one target provider's callback can be satisfied without a PKCE verifier (i.e. it relies only on `state` or only on `nonce`).\n\nYou are **not** affected if you use a single OAuth provider, do not allow logged-in account linking, or all providers enforce PKCE.\n\n## Impact\n\n- Account-linking confusion: an attacker can get their account at a target provider linked to the victim's Auth.js user, granting the attacker persistent sign-in to the victim's account through that linked provider.\n- Exploitation requires luring the victim into starting a legitimate same-origin flow; it cannot be performed by cross-site request forgery alone, which reduces practical likelihood.\n\n## Patched version\n\nThe fix binds the OAuth check cookies to the provider/authorization flow that created them, so a callback cannot consume a check value minted for a different provider. Upgrade to the first releases containing this fix (pending; this advisory will be updated with exact patched versions before publication).\n\n## Workarounds\n\nIf you cannot upgrade immediately:\n\n- Enable PKCE (`checks: [\"pkce\"]`, in addition to `state`/`nonce`) on every provider that supports it; PKCE blocks the practical code-swap variant because the attacker cannot observe the relying party's verifier.\n- Avoid offering logged-in account linking across multiple providers where one provider is lower-trust or attacker-observable.\n- Treat `events.linkAccount` as sensitive: add audit logging, user notification, or out-of-band confirmation so that any unexpected link is visible (defense-in-depth, not a root-cause fix).\n\n## Credit\n\nReported by @Nadav0077. Thank you for the responsible disclosure.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@auth/core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.41.3"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.41.2"
    }
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "next-auth"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0-beta.1"
      }, {
        "fixed" : "5.0.0-beta.32"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 5.0.0-beta.31"
    }
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "next-auth"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.24.15"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 4.24.14"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/nextauthjs/next-auth/security/advisories/GHSA-x445-f3h2-j279"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-73419"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nextauthjs/next-auth/pull/13469"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nextauthjs/next-auth/commit/5bca2399a79ba8d116ca5179b4b1ebcd152e7f05"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nextauthjs/next-auth/commit/9f7a97fade9b1319bb9ac19fc9828d62e0a2a852"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/nextauthjs/next-auth"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nextauthjs/next-auth/releases/tag/@auth/core@0.41.3"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nextauthjs/next-auth/releases/tag/next-auth@4.24.15"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nextauthjs/next-auth/releases/tag/next-auth@5.0.0-beta.32"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-345", "CWE-346", "CWE-940" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-23T14:31:51Z",
    "nvd_published_at" : "2026-08-12T21:17:41Z"
  }
}