CVE-2022-21721
JSON

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 packageVersionsReported by
Unspecified productn/aCVE List
next (npm)from 12.0.0 before 12.0.9GitHub Advisory Database
vercel next.jsfrom 12.0.0 before 12.0.9NVD

All scores

GitHub_M5.9medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
GitHub5.9medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD4.3medium CVSS:2.0AV:N/AC:M/Au:N/C:N/I:N/A:P

Classification

CWE-20CWE-400

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

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:

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

Sources

SourceRecordLicence
CVE ListCVE-2022-21721 changed 2025-05-05CVE Terms of Use
GitHub Advisory DatabaseGHSA-wr66-vrwm-5g5x changed 2026-09-10CC-BY-4.0
NVDCVE-2022-21721 changed 2026-06-17Public domain