# CVE-2025-64762: authkit-nextjs may let session cookies be cached in CDNs

> Attackers can steal session tokens if CDN caching is enabled, as the library fails to set anti-caching headers on authenticated responses.

- **Severity:** High 8.0 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 21 Nov 2025
- **Updated:** 24 Nov 2025
- **Also known as:** GHSA-p8pf-44ff-93gf

## What is CVE-2025-64762?

CVE-2025-64762 is a high-severity vulnerability in workos authkit-nextjs, published on 21 Nov 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

The AuthKit library for Next.js provides convenient helpers for authentication and session management using WorkOS & AuthKit with Next.js. 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. Patched in authkit-nextjs 2.11.1, which applies anti-caching headers to all responses behind authentication.

Weakness: CWE-524 (Use of Cache Containing Sensitive Information)

## Which versions are affected by CVE-2025-64762?

2 open source packages ship an affected version, including @workos-inc/authkit-nextjs. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `@workos-inc/authkit-nextjs` | npm | All versions | 2.11.1 |
| `@workos-inc/authkit-nextjs` | npm | All versions | 2.11.1 |

Products: Workos Authkit-Nextjs.

## How do I fix CVE-2025-64762?

Upgrade @workos-inc/authkit-nextjs to 2.11.1 or later.

## Is CVE-2025-64762 being exploited?

There is no known exploitation of CVE-2025-64762 in the wild and no public exploit code.

## Other vulnerabilities in workos authkit-nextjs

- [CVE-2024-29901](https://insights.sbomify.com/CVE-2024-29901/): @workos-inc/authkit-nextjs session replay vulnerability (medium 4.8)
- [CVE-2024-51752](https://insights.sbomify.com/CVE-2024-51752/): Refresh tokens are logged when the debug flag is enabled in @workos-inc/authkit-nextjs (low 2.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-64762 and fix it if it is affected.

What it is: CVE-2025-64762 is a high-severity vulnerability in workos authkit-nextjs, published on 21 Nov 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2025-64762 in the wild and no public exploit code.

Affected packages and fixed versions:
- @workos-inc/authkit-nextjs (npm): affected all versions; fixed in 2.11.1
- @workos-inc/authkit-nextjs (npm): affected all versions; fixed in 2.11.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-64762/ (Markdown: https://insights.sbomify.com/CVE-2025-64762/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-64762
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-64762
- OSV: https://osv.dev/vulnerability/CVE-2025-64762

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-64762/
Summaries are generated and may contain mistakes; the official description above is the record.
