# CVE-2026-40155: Auth0 Next.js SDK has Improper Proxy Cache Lookup

Source: https://junglewise.ai/threats/cve-2026-40155-auth0-next-js-sdk-has-improper-proxy-cache-lookup  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-04-21. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2026-40155 · Severity: medium · CVSS 5.4 · Published 2026-04-21

Auth0's Next.js SDK is used by developers to integrate authentication into Next.js applications. Under specific conditions involving simultaneous authentication requests with cache enabled, the SDK may improperly serve cached authentication tokens to unintended users, potentially exposing user identity information and allowing unauthorized access to user resources.

Technologies: [@auth0/nextjs-auth0 (npm)](https://junglewise.ai/threats/technologies/auth0-nextjs-auth0). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2026-40155 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-40155 being exploited in the wild.

**How severe is CVE-2026-40155?** Medium severity, with a CVSS score of 5.4, published 21 April 2026.

**Which products and versions are affected?** @auth0/nextjs-auth0 (npm) >= 4.12.0, <= 4.17.0, SEMVER:introduced=4.12.0,fixed=4.18.0.

**Is there a fix for CVE-2026-40155?** Yes. @auth0/nextjs-auth0 (npm): upgrade to 4.18.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-40155 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-40155?** Check whether you run @auth0/nextjs-auth0 (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- @auth0/nextjs-auth0 (npm): upgrade to 4.18.0 or later

  ```sh
  npm install @auth0/nextjs-auth0@4.18.0
  ```


## Technical details

The vulnerability is a race condition (improper cache lookup) in the proxy cache handler of Auth0's Next.js SDK versions 4.12.0–4.17.0. When simultaneous requests trigger nonce retry logic with DPoP (Demonstrating Proof-of-Possession) enabled on the /me/* and /my-org/* proxy endpoints, the cache fetcher fails to properly isolate token lookup results, causing one user's cached authentication token to be served to another concurrent request. This requires the attacker to have low-level privileges and user interaction to trigger, but can expose confidential user data. The vulnerability is patched in version 4.18.0.

## Affected products

- Auth0 Next.js SDK 4.12.0 to 4.17.0

## Identifiers

- CVE-2026-40155
- GHSA-xq8m-7c5p-c2r6

## Timeline

- 2026-04-21: disclosed: GHSA-xq8m-7c5p-c2r6 published
- 2026-04-21: patched: Fixed in version 4.18.0

## References

- [https://github.com/auth0/nextjs-auth0/security/advisories/GHSA-xq8m-7c5p-c2r6](https://github.com/auth0/nextjs-auth0/security/advisories/GHSA-xq8m-7c5p-c2r6)

## Related threats

- [Auth0 Next.js SDK improper query parameter validation](https://junglewise.ai/threats/cve-2025-67716-auth0-next-js-sdk-improper-query-parameter-validation)
- [Auth0 Next.js SDK improper request caching lookup](https://junglewise.ai/threats/cve-2025-67490-auth0-next-js-sdk-improper-request-caching-lookup)
- [Auth0 NextJS-Auth0 SDK CDN caching of session cookies](https://junglewise.ai/threats/cve-2025-48947-auth0-nextjs-auth0-sdk-cdn-caching-of-session-cookies)
- [Auth0 NextJS SDK missing session invalidation](https://junglewise.ai/threats/cve-2025-46344-auth0-nextjs-sdk-missing-session-invalidation)
- [Auth0 nextjs-auth0 open redirect in login handler](https://junglewise.ai/threats/cve-2021-43812-auth0-nextjs-auth0-open-redirect-in-login-handler)
