CVE-2025-64762: authkit-nextjs Session Cookie Caching Vulnerability

@workos-inc/authkit-nextjs Updated 14 Dec 2025

Summary

20/11/2025
Yes i
High
8.0

CVE-2025-64762: authkit-nextjs may let session cookies be cached in CDNs. Affects @workos-inc/authkit-nextjs versions < 2.11.1. Fixed in 2.11.1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

authkit-nextjs is a package designed for integrating authentication in Next.js applications, providing developers with tools to manage user sessions securely. The package simplifies the process of handling authentication tokens and user sessions, ensuring that applications can maintain user states effectively. However, certain versions of this package have been found to be vulnerable to caching issues that can expose sensitive session information.

Vulnerability Detail

In authkit-nextjs version 2.11.0 and below, authenticated responses do not implement anti-caching headers, which can lead to session tokens being cached by CDNs. This vulnerability allows unauthorized users to potentially access another user's session token if the cached response is served to them. The risk is particularly pronounced in environments where CDN caching is enabled, and it depends on the deployment configuration and caching policies in place.

How To Fix

Minimum fixed version

2.11.1

This is the first release that contains the fix.

npm install @workos-inc/authkit-nextjs@2.11.1

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, ensure that your application code and middleware set appropriate Cache-Control headers for authenticated routes. For example, you can add the following headers in your Next.js API routes:

export default function handler(req, res) {
  res.setHeader('Cache-Control', 'no-store, no-cache, must-revalidate, proxy-revalidate');
  res.setHeader('Pragma', 'no-cache');
  res.setHeader('Expires', '0');
  // Your authentication logic here
}

Conclusion

The authkit-nextjs package has a significant vulnerability that can lead to session token caching, potentially exposing sensitive user information. It is crucial to update to version 2.11.1 or later to mitigate this risk. Additionally, implementing proper caching headers can serve as a temporary workaround while ensuring application security.

See every vulnerability recorded for @workos-inc/authkit-nextjs →

Share this vulnerability

FAQ

The impact includes the potential for unauthorized users to access another user's session token, which can lead to session hijacking.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

If you cannot update the package right away, implement the recommended Cache-Control headers as a temporary measure to prevent caching of sensitive information.

Next.js applications deployed on Vercel are not affected unless CDN caching is manually enabled by setting cache headers on authenticated paths.

Vulert monitors and alerts for open-source vulnerabilities in your software by analyzing the package-lock.json file, providing real-time insights into potential security issues.

Related vulnerabilities

Recent vulnerabilities recorded for @workos-inc/authkit-nextjs.

How To Fix

Minimum fixed version

2.11.1

This is the first release that contains the fix.

npm install @workos-inc/authkit-nextjs@2.11.1

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback