Vulnerabilities in pkg:npm/@workos-inc/authkit-nextjs

PACKAGE
Advisory Identifier: GHSA-p8pf-44ff-93gf
Advisory Summary

CVE-2025-64762 is a HIGH authkit-nextjs may let session cookies vulnerability (CWE-524: Use of Cache Containing Sensitive Information) affecting @workos inc/authkit nextjs libraries in the npm ecosystem. The issue involves authkit-nextjs may let session cookies be cached in cdns. Remediation is available by upgrading affected packages to version 2.11.1.

3 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@workos-inc/authkit-nextjs

3 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-p8pf-44ff-93gf CVE-2025-64762 HIGH authkit-nextjs may let session cookies be cached in CDNs
GHSA-5wmg-9cvh-qw25 CVE-2024-51752 LOW @workos-inc/authkit-nextjs refresh tokens are logged when the debug flag is enabled
GHSA-35w3-6qhc-474v CVE-2024-29901 MODERATE @workos-inc/authkit-nextjs session replay vulnerability

CVE-2025-64762 at a Glance

CVE Identifier CVE-2025-64762
GHSA Identifier GHSA-p8pf-44ff-93gf
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-524: Use of Cache Containing Sensitive Information
Affected Product @workos inc/authkit nextjs
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2025-64762

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

@workos-inc/authkit-nextjs fixed: 2.11.1
npm install @workos-inc/authkit-nextjs@2.11.1
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 @workos-inc/authkit-nextjs

How to Check if You Are Affected

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

npm ls @workos-inc/authkit-nextjs

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

Note: The npm ls @workos-inc/authkit-nextjs 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-524: Use of Cache Containing Sensitive Information, where the code uses a cache that contains sensitive information, but the cache can be read by an actor outside of the intended control sphere. In @workos inc/authkit nextjs, 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

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

CVE-2025-64762 Affected @workos inc/authkit nextjs Versions

1 component(s)
Fixed Versions:
2.11.1
Product / Package Ecosystem Affected Versions Fixed Version
@workos-inc/authkit-nextjs
npm
< 2.11.1
2.11.1

References

Frequently Asked Questions

What is CVE-2025-64762?
CVE-2025-64762 is a security vulnerability in @workos inc/authkit nextjs involving authkit-nextjs may let session cookies be cached in CDNs under CWE-524: Use of Cache Containing Sensitive Information.
Which @workos inc/authkit nextjs versions are affected?
Affected versions include releases prior to 2.11.1 across affected packages: @workos-inc/authkit-nextjs.
What version fixes CVE-2025-64762?
Upgrading to 2.11.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @workos-inc/authkit-nextjs affected?
Yes, @workos-inc/authkit-nextjs is affected in releases prior to 2.11.1. Upgrade your dependency to 2.11.1 or later.
What CWE is associated with CVE-2025-64762?
CVE-2025-64762 is classified under CWE-524: Use of Cache Containing Sensitive Information (The code uses a cache that contains sensitive information, but the cache can be read by an actor outside of the intended control sphere.).
How can I check npm dependencies for CVE-2025-64762?
Run the dependency tree command: 'npm ls @workos-inc/authkit-nextjs'. 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-p8pf-44ff-93gf",
  "modified" : "2025-11-21T15:32:21Z",
  "published" : "2025-11-20T21:29:16Z",
  "aliases" : [ "CVE-2025-64762" ],
  "summary" : "authkit-nextjs may let session cookies be cached in CDNs",
  "details" : "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.\n\nNext.js applications deployed on Vercel are unaffected **unless** they manually enable CDN caching by setting cache headers on authenticated paths.\n\n### Impact\nThis 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.\n\n### Patches\nPatched in `authkit-nextjs` 2.11.1, which applies anti-caching headers to all responses behind authentication.\n\n### Notes\nAuthentication 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:\n  - Review your application code, middleware, and infrastructure configuration to ensure the Cache-Control headers set for authenticated paths prevent inappropriate caching\n  - For application paths that require caching, do not allow user-specific or sensitive authenticated information to be included in the response data or headers",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@workos-inc/authkit-nextjs"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.11.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.11.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/workos/authkit-nextjs/security/advisories/GHSA-p8pf-44ff-93gf"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-64762"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/workos/authkit-nextjs/commit/94cf438124993abb0e7c19dac64c3cb5724a15ea"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/workos/authkit-nextjs"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/workos/authkit-nextjs/releases/tag/v2.11.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-524" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-11-20T21:29:16Z",
    "nvd_published_at" : "2025-11-21T02:15:44Z"
  }
}