Skip to main content

CVE-2022-21721: n/a in n/a

Medium
VulnerabilityCVE-2022-21721cvecve-2022-21721
Published: Fri Jan 28 2022 (01/28/2022, 22:00:17 UTC)
Source: CVE
Vendor/Project: n/a
Product: n/a

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-Powered Analysis

AILast updated: 07/06/2025, 23:25:30 UTC

Technical Analysis

CVE-2022-21721 is a medium-severity vulnerability affecting Next.js, a popular React framework used for server-side rendering and static site generation. The vulnerability exists in versions starting from 12.0.0 up to but not including 12.0.9, specifically impacting deployments that utilize the built-in internationalization (i18n) functionality. The issue allows an unauthenticated attacker to trigger a denial of service (DoS) condition by sending crafted requests targeting the i18n routing mechanism. This vulnerability requires that the Next.js application be run using 'next start' or a custom server setup, as opposed to managed environments like Vercel, which filter invalid requests and thus are not affected. The attack vector involves sending requests to paths such as '/{locale}/_next/' that exploit the i18n routing logic, causing resource exhaustion or application crashes. The vulnerability does not impact confidentiality or integrity but affects availability, making the application unresponsive to legitimate users. A patch was released in version 12.0.9 of Next.js that addresses this issue. Until upgrading is feasible, a recommended workaround is to block requests matching the pattern '/{locale}/_next/' from reaching the Next.js server. The CVSS v3.1 score is 5.9 (medium), reflecting network attack vector, high attack complexity, no privileges required, no user interaction, and impact limited to availability. No known exploits in the wild have been reported to date.

Potential Impact

For European organizations, this vulnerability poses a risk primarily to web applications built with Next.js versions 12.0.0 through 12.0.8 that use the i18n feature and are self-hosted or run on custom servers without upstream filtering. The DoS attack can disrupt availability of public-facing websites or internal portals, potentially causing service outages, loss of customer trust, and operational disruption. Organizations relying on Next.js for multilingual content delivery may experience degraded user experience or downtime, impacting e-commerce, government services, media, and other sectors with significant web presence. Since the vulnerability does not affect deployments on Vercel or similar platforms that filter requests, organizations using such managed services are less at risk. However, self-hosted environments without proper request filtering remain vulnerable. The impact is availability-focused and does not compromise data confidentiality or integrity, but service disruption can have significant business consequences, especially for high-traffic or critical applications.

Mitigation Recommendations

1. Upgrade Next.js to version 12.0.9 or later immediately to apply the official patch that fixes the vulnerability. 2. If upgrading is not immediately possible, implement network-level or application-level filtering to block requests matching the pattern '/{locale}/_next/' to prevent malicious requests from reaching the Next.js server. This can be done via web application firewalls (WAF), reverse proxies, or server configuration rules. 3. Review server and application logs to detect unusual request patterns targeting i18n routes and monitor for potential DoS attempts. 4. For organizations using custom servers, ensure that input validation and rate limiting are in place to mitigate abuse of routing mechanisms. 5. Consider migrating to managed hosting platforms like Vercel that inherently filter invalid requests if operationally feasible. 6. Conduct regular dependency audits and vulnerability scans to detect outdated Next.js versions and other vulnerable components. 7. Educate development and operations teams about the importance of timely patching and secure configuration of internationalization features.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
GitHub_M
Date Reserved
2021-11-16T00:00:00.000Z
Cisa Enriched
true
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682d981ec4522896dcbdbe9e

Added to database: 5/21/2025, 9:08:46 AM

Last enriched: 7/6/2025, 11:25:30 PM

Last updated: 8/18/2025, 3:29:52 PM

Views: 17

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats