CVE-2026-64647: Next Cache Confusion Of Response Bodies Vulnerability

MODERATE
Advisory Identifier: GHSA-4633-3j49-mh5q
CWE-116
Published
Advisory Summary

CVE-2026-64647 is a MODERATE cache confusion of response bodies vulnerability (CWE-116: Improper Encoding or Escaping of Output) affecting Next libraries in the npm ecosystem. The issue involves cache confusion of response bodies for requests with bodies containing invalid utf-8 byte sequences. Remediation is available by upgrading affected packages to version 15.5.21, 16.2.11.

CVE-2026-64647 at a Glance

CVE Identifier CVE-2026-64647
GHSA Identifier GHSA-4633-3j49-mh5q
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-116: Improper Encoding or Escaping of Output
Affected Product Next
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2026-64647

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

next fixed: 15.5.21
npm install next@15.5.21
next fixed: 16.2.11
npm install next@16.2.11
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 next

How to Check if You Are Affected

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

npm ls next

Analyze the terminal output to locate any version of Next in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 15.5.21), your application is affected.

Note: The npm ls next 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-116: Improper Encoding or Escaping of Output, where the product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. as a result, the intended structure of the message is not preserved. In Next, 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

## Impact A server-side `fetch` with a request body may return a cached **response** body from a different request to the same URL but different body. Confidential data in the `POST`'s **response** body would then leak to unauthorized requests. Though the request itself will not be deduped. This is only an issue when receiving request bodies with a content type charset other than UTF-8. For example, the UTF-16 byte sequences for `삃삃` and `섄섄` in the request body would share the same cache. ## Workarounds If you cannot upgrade, consider only making fetch requests with UTF-8 bodies (default in Next.js). Applications using Pages Router are not vulnerable.

CVE-2026-64647 Affected Next Versions

2 component(s)
Fixed Versions:
15.5.2116.2.11
Product / Package Ecosystem Affected Versions Fixed Version
next
npm
≥ 13.0.0
< 15.5.21
15.5.21
next
npm
≥ 16.0.0
< 16.2.11
16.2.11

References

Frequently Asked Questions

What is CVE-2026-64647?
CVE-2026-64647 is a security vulnerability in Next involving Cache confusion of response bodies for requests with bodies containing invalid UTF-8 byte sequences under CWE-116: Improper Encoding or Escaping of Output.
Which Next versions are affected?
Affected versions include releases prior to 15.5.21, 16.2.11 across affected packages: next.
What version fixes CVE-2026-64647?
Upgrading to 15.5.21, 16.2.11 (or the latest patched release for your respective branch) resolves the vulnerability.
Is next affected?
Yes, next is affected in releases prior to 15.5.21, 16.2.11. Upgrade your dependency to 15.5.21, 16.2.11 or later.
What CWE is associated with CVE-2026-64647?
CVE-2026-64647 is classified under CWE-116: Improper Encoding or Escaping of Output (The product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. As a result, the intended structure of the message is not preserved.).
How can I check npm dependencies for CVE-2026-64647?
Run the dependency tree command: 'npm ls next'. 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-4633-3j49-mh5q",
  "modified" : "2026-07-22T23:06:12Z",
  "published" : "2026-07-22T23:06:12Z",
  "aliases" : [ "CVE-2026-64647" ],
  "summary" : "Next.js: Cache confusion of response bodies for requests with bodies containing invalid UTF-8 byte sequences",
  "details" : "## Impact\n\nA server-side `fetch` with a request body may return a cached **response** body from a different request to the same URL but different body. Confidential data in the `POST`'s **response** body would then leak to unauthorized requests. Though the request itself will not be deduped.\n\nThis is only an issue when receiving request bodies with a content type charset other than UTF-8. For example, the UTF-16 byte sequences for `삃삃` and `섄섄` in the request body would share the same cache.\n\n## Workarounds\n\nIf you cannot upgrade, consider only making fetch requests with UTF-8 bodies (default in Next.js). Applications using Pages Router are not vulnerable.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "next"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "13.0.0"
      }, {
        "fixed" : "15.5.21"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "next"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "16.0.0"
      }, {
        "fixed" : "16.2.11"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/vercel/next.js/security/advisories/GHSA-4633-3j49-mh5q"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/vercel/next.js/pull/96008"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/vercel/next.js/commit/025bf4a5f7b47fb7758c4ebf1c931a61c451c082"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/vercel/next.js"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/vercel/next.js/releases/tag/v15.5.21"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/vercel/next.js/releases/tag/v16.2.11"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-116" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-22T23:06:12Z",
    "nvd_published_at" : null
  }
}