High

authkit-nextjs may let session cookies be cached in CDNs

  • Disclosed: 20.11.2025
  • Updated: 11.10.2026 10:22

In authkit-nextjs version 2.11.0 and below, authenticated responses do not defensively apply anti-caching headers. In environments where CDN caching is enabled, this can result in session tokens being included in cached responses and subsequently served to multiple users.

Next.js applications deployed on Vercel are unaffected unless they manually enable CDN caching by setting cache headers on authenticated paths.

Impact

This vulnerability may lead to session caching, potentially allowing unauthorized users to obtain another user’s session token. The severity depends on deployment configuration, caching policy, and whether authenticated routes are inadvertently cached.

Patches

Patched in authkit-nextjs 2.11.1, which applies anti-caching headers to all responses behind authentication.

Notes

Authentication middleware should set anti-caching headers for authenticated routes as a defense in depth measure, but cannot guarantee these headers will not be overwritten elsewhere in the application. We recommend the following:

  • Review your application code, middleware, and infrastructure configuration to ensure the Cache-Control headers set for authenticated paths prevent inappropriate caching
  • For application paths that require caching, do not allow user-specific or sensitive authenticated information to be included in the response data or headers

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
npm package @workos-inc/authkit-nextjs < 2.11.1 2.11.1

References

CVSS score -
CVSS vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N/E:U
Weakness (CWE)
CWE-524
Platform
npm
Package
@workos-inc/authkit-nextjs
Disclosed
20.11.2025
Updated
11.10.2026 10:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-p8pf-44ff-93gf - CC BY 4.0

Vulnerability history: @workos-inc/authkit-nextjs

All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.

Total entries
3
First → latest
03.2024 11.2025
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • High 1
  • Medium 1
  • Low 1

Disclosures per year

  1. 2024: 2
  2. 2025: 1
  3. 2026: 0
  1. authkit-nextjs may let session cookies be cached in CDNs this entry
    High CVE-2025-64762 < 2.11.1 2.11.1
  2. Medium · 4.8 CVE-2024-29901 < 0.4.2 0.4.2

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.