Vulnerabilities in pkg:npm/@auth0/nextjs-auth0

PACKAGE
Advisory Identifier: GHSA-xq8m-7c5p-c2r6
Advisory Summary

CVE-2026-40155 is a MODERATE (CVSS 5.4) auth0 next.js sdk has improper vulnerability (CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')) affecting @auth0/nextjs auth0 libraries in the npm ecosystem. The issue involves auth0 next.js sdk has improper proxy cache lookup. Remediation is available by upgrading affected packages to version 4.18.0.

7 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@auth0/nextjs-auth0

7 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-xq8m-7c5p-c2r6 CVE-2026-40155 MODERATE Auth0 Next.js SDK has Improper Proxy Cache Lookup
GHSA-mr6f-h57v-rpj5 CVE-2025-67716 LOW Improper Validation of Query Parameters in Auth0 Next.js SDK
GHSA-wcgj-f865-c7j7 CVE-2025-67490 MODERATE Improper Request Caching Lookup in the Auth0 Next.js SDK
GHSA-f3fg-mf2q-fj3f CVE-2025-48947 HIGH NextJS-Auth0 SDK Vulnerable to CDN Caching of Session Cookies
GHSA-pjr6-jx7r-j4r6 CVE-2025-46344 MODERATE Auth0 NextJS SDK v4 Missing Session Invalidation
GHSA-2mqv-4j3r-vjvp CVE-2021-43812 MODERATE Open redirect in @auth0/nextjs-auth0
GHSA-954c-jjx6-cxv7 CVE-2021-32702 HIGH Reflected XSS from the callback handler's error query parameter

CVE-2026-40155 at a Glance

CVE Identifier CVE-2026-40155
GHSA Identifier GHSA-xq8m-7c5p-c2r6
Severity MODERATE
CVSS v3.1 Base Score 5.4
CWE Classification CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
Affected Product @auth0/nextjs auth0
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 5.4

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

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

How to Fix CVE-2026-40155

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

@auth0/nextjs-auth0 fixed: 4.18.0
npm install @auth0/nextjs-auth0@4.18.0
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 @auth0/nextjs-auth0

How to Check if You Are Affected

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

npm ls @auth0/nextjs-auth0

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

Note: The npm ls @auth0/nextjs-auth0 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-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition'), where the product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence operating concurrently. In @auth0/nextjs auth0, 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

### Description In affected versions of the Next.js SDK, simultaneous requests that trigger a nonce retry may cause the proxy cache fetcher to perform improper lookups for the token request results. ### Which Projects are Affected? Users are affected if they meet all of the following preconditions: - Applications using the auth0/nextjs-auth0 SDK, versions 4.12.0 to 4.17.0, and - Applications using the proxy handler /me/* and /my-org/* with DPoP enabled. ### Affected product and versions Auth0/nextjs-auth0 v4.12.0 to 4.17.0 ### Resolution Upgrade Auth0/nextjs-auth0 version to v4.18.0 or greater ### Acknowledgements Okta would like to thank Reynaldo Immanuel for their discovery and responsible disclosure.

CVE-2026-40155 Affected @auth0/nextjs auth0 Versions

1 component(s)
Fixed Versions:
4.18.0
Product / Package Ecosystem Affected Versions Fixed Version
@auth0/nextjs-auth0
npm
≥ 4.12.0
< 4.18.0
4.18.0

References

Frequently Asked Questions

What is CVE-2026-40155?
CVE-2026-40155 is a security vulnerability in @auth0/nextjs auth0 involving Auth0 Next.js SDK has Improper Proxy Cache Lookup under CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition').
Which @auth0/nextjs auth0 versions are affected?
Affected versions include releases prior to 4.18.0 across affected packages: @auth0/nextjs-auth0.
What version fixes CVE-2026-40155?
Upgrading to 4.18.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @auth0/nextjs-auth0 affected?
Yes, @auth0/nextjs-auth0 is affected in releases prior to 4.18.0. Upgrade your dependency to 4.18.0 or later.
What is the CVSS score of CVE-2026-40155?
CVE-2026-40155 has a CVSS v3.1 base score of 5.4 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:L/A:N.
What CWE is associated with CVE-2026-40155?
CVE-2026-40155 is classified under CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') (The product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence operating concurrently.).
How can I check npm dependencies for CVE-2026-40155?
Run the dependency tree command: 'npm ls @auth0/nextjs-auth0'. 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-xq8m-7c5p-c2r6",
  "modified" : "2026-04-21T15:21:46Z",
  "published" : "2026-04-21T15:21:46Z",
  "aliases" : [ "CVE-2026-40155" ],
  "summary" : "Auth0 Next.js SDK has Improper Proxy Cache Lookup",
  "details" : "### Description\nIn affected versions of the Next.js SDK, simultaneous requests that trigger a nonce retry may cause the proxy cache fetcher to perform improper lookups for the token request results.\n\n### Which Projects are Affected?\nUsers are affected if they meet all of the following preconditions:\n- Applications using the auth0/nextjs-auth0 SDK, versions 4.12.0 to 4.17.0, and\n- Applications using the proxy handler  /me/* and /my-org/* with DPoP enabled.\n\n\n### Affected product and versions\nAuth0/nextjs-auth0 v4.12.0 to 4.17.0\n\n### Resolution\nUpgrade Auth0/nextjs-auth0 version to v4.18.0 or greater\n\n### Acknowledgements\nOkta would like to thank Reynaldo Immanuel for their discovery and responsible disclosure.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@auth0/nextjs-auth0"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.12.0"
      }, {
        "fixed" : "4.18.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 4.17.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/auth0/nextjs-auth0/security/advisories/GHSA-xq8m-7c5p-c2r6"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-40155"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/auth0/nextjs-auth0/commit/98c36dc306970c2230ea1a32efef431d29b99978"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/auth0/nextjs-auth0"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/auth0/nextjs-auth0/releases/tag/v4.18.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-362", "CWE-863" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-21T15:21:46Z",
    "nvd_published_at" : "2026-04-17T21:16:33Z"
  }
}