Improper Encoding or Escaping of Output Affecting next package, versions >=13.0.0 <15.5.21>=16.0.0 <16.2.11


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.51% (41st percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-NEXT-18230947
  • published23 Jul 2026
  • disclosed22 Jul 2026
  • creditUnknown

Introduced: 22 Jul 2026

NewCVE-2026-64647  (opens in a new tab)
CWE-116  (opens in a new tab)

How to fix?

Upgrade next to version 15.5.21, 16.2.11 or higher.

Overview

next is a react framework.

Affected versions of this package are vulnerable to Improper Encoding or Escaping of Output via the IncrementalCache.generateCacheKey function in next/dist/server/lib/incremental-cache. An attacker can make a server-side fetch return a cached response body from a different request by sending POST requests to the same URL with different non-UTF-8 request bodies that collapse to the same cache key. The affected cache key generation decodes request bodies as strings, so distinct byte sequences with invalid UTF-8 can hash to the same entry even though the requests are not deduped. This can leak confidential response data from one POST to an unauthorized request that uses a colliding body, breaking response isolation for server-side cached fetches.

Notes

  • Applications using Pages Router are not affected; the advisory’s cache-key confusion is in the server-side fetch cache path used by the App Router/IncrementalCache flow.
  • The issue is only reachable when request bodies are sent with a non-UTF-8 charset or otherwise contain byte sequences that do not round-trip as UTF-8; default UTF-8 request bodies do not trigger the collision described in the advisory.

CVSS Base Scores

version 4.0
version 3.1