DOS Vulnerability in next.js
Description
Next.js is a React framework. Starting with version 12.0.0 and prior to version 12.0.9, vulnerable code could allow a bad actor to trigger a denial of service attack for anyone using i18n functionality. In order to be affected by this CVE, one must use next start or a custom server and the built-in i18n support. Deployments on Vercel, along with similar environments where invalid requests are filtered before reaching Next.js, are not affected. A patch has been released, next@12.0.9, that mitigates this issue. As a workaround, one may ensure /${locale}/_next/ is blocked from reaching the Next.js instance until it becomes feasible to upgrade.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Next.js versions 12.0.0 to 12.0.9 have a denial-of-service vulnerability in the i18n routing functionality that can crash the server via crafted requests.
Vulnerability
A denial-of-service vulnerability exists in Next.js versions 12.0.0 through 12.0.8 when using the built-in i18n (internationalization) routing support with next start or a custom server [1][2]. The bug allows an attacker to trigger a heap overflow by sending crafted requests to the /${locale}/_next/ route prefix, causing the server process to crash [2]. Deployments on Vercel, where such malformed requests are filtered upstream, are not affected [1][2].
Exploitation
An attacker with network access to the Next.js server can send specially crafted HTTP requests targeting the /${locale}/_next/ path prefix [2]. No authentication or prior access is required. The request triggers an unhandled condition that causes a heap overflow and crashes the server process, resulting in a denial of service [2].
Impact
Successful exploitation causes the Next.js server to crash, leading to a temporary denial of service for all users [1][2]. The vulnerability affects availability only; there is no evidence of information disclosure or remote code execution in the references.
Mitigation
A fix is available in Next.js version 12.0.9, which is backward-compatible and recommended for all users [1][2]. As a workaround, administrators can block requests matching the pattern /${locale}/_next/ from reaching the Next.js instance until an upgrade is feasible [1][2].
AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
nextnpm | >= 12.0.0, < 12.0.9 | 12.0.9 |
Affected products
2- Next.js/Next.jsdescription
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
5- github.com/advisories/GHSA-wr66-vrwm-5g5xghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2022-21721ghsaADVISORY
- github.com/vercel/next.js/pull/33503ghsax_refsource_MISCWEB
- github.com/vercel/next.js/releases/tag/v12.0.9ghsax_refsource_MISCWEB
- github.com/vercel/next.js/security/advisories/GHSA-wr66-vrwm-5g5xghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.