5.9medium
DOS Vulnerability in next.js
- Severity
- 5.9medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 2.22% (higher than 83% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-wr66-vrwm-5g5x
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Unspecified product | n/a | CVE List |
| next (npm) | from 12.0.0 before 12.0.9 | GitHub Advisory Database |
| vercel next.js | from 12.0.0 before 12.0.9 | NVD |
All scores
| GitHub_M | 5.9medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 5.9medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 4.3medium CVSS:2.0 | AV:N/AC:M/Au:N/C:N/I:N/A:P |
Classification
What each source says
CVE List
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.
GitHub Advisory Database
Impact
Vulnerable code could allow a bad actor to trigger a denial of service attack for anyone running a Next.js app at version >= 12.0.0, and using i18n functionality.
- Affected: All of the following must be true to be affected by this CVE
- Next.js versions above v12.0.0
- Using next start or a custom server
- Using the built-in i18n support
- Not affected:
- Deployments on Vercel (vercel.com) are not affected along with similar environments where invalid requests are filtered before reaching Next.js.
Patches
A patch has been released, next@12.0.9, that mitigates this issue. We recommend all affected users upgrade as soon as possible.
Workarounds
We recommend upgrading whether you can reproduce or not although you can ensure /${locale}/_next/ is blocked from reaching the Next.js instance until you upgrade.
For more information
If you have any questions or comments about this advisory:
- Open an issue in next
- Email us at security@vercel.com
NVD (es)
Next.js es un framework de React. A partir de la versión 12.0.0 y versiones anteriores a 12.0.9, el código vulnerable podría permitir a un mal actor desencadenar un ataque de denegación de servicio para cualquiera que use la funcionalidad i18n. Para ser afectado por esta CVE, uno debe usar next start o un servidor personalizado y el soporte i18n incorporado. Los despliegues en Vercel, junto con entornos similares en los que son filtradas las peticiones no válidas antes de llegar a Next.js, no están afectados. Ha sido publicado un parche, "next@12.0.9", que mitiga este problema. Como medida de mitigación, puede asegurarse que "/${locale}/_next/" esté bloqueado para que no llegue a la instancia de Next.js hasta que sea posible la actualización
References
| https://github.com/vercel/next.js/security/advisories/GHSA-wr66-vrwm-5g5x | third-party-advisory, web | |
| https://github.com/vercel/next.js/pull/33503 | patch, third-party-advisory, web | |
| https://github.com/vercel/next.js/releases/tag/v12.0.9 | release-notes, third-party-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2022-21721 | advisory | |
| https://github.com/vercel/next.js | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2022-21721 changed 2025-05-05 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-wr66-vrwm-5g5x changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2022-21721 changed 2026-06-17 | Public domain |