Skip to main content

CVE-2022-36046: CWE-248: Uncaught Exception in vercel next.js

Medium
Published: Wed Aug 31 2022 (08/31/2022, 18:55:09 UTC)
Source: CVE
Vendor/Project: vercel
Product: next.js

Description

Next.js is a React framework that can provide building blocks to create web applications. All of the following must be true to be affected by this CVE: Next.js version 12.2.3, Node.js version above v15.0.0 being used with strict `unhandledRejection` exiting AND using next start or a [custom server](https://nextjs.org/docs/advanced-features/custom-server). Deployments on Vercel ([vercel.com](https://vercel.com/)) are not affected along with similar environments where `next-server` isn't being shared across requests.

AI-Powered Analysis

AILast updated: 06/22/2025, 23:20:54 UTC

Technical Analysis

CVE-2022-36046 is a medium-severity vulnerability affecting Next.js version 12.2.3, a popular React framework used for building web applications. The vulnerability arises from an uncaught exception scenario (CWE-248) when running Next.js with Node.js versions above 15.0.0 under specific conditions. Specifically, it manifests if the Node.js environment is configured with the strict 'unhandledRejection' policy that causes the process to exit on unhandled promise rejections, and if the application is started using 'next start' or a custom server setup where the 'next-server' instance is shared across requests. This combination can lead to unhandled exceptions causing the Node.js process to terminate unexpectedly. Notably, deployments on Vercel's managed platform or similar environments where 'next-server' instances are not shared across requests are not affected. The vulnerability does not have known exploits in the wild, and no official patches or fixes are referenced in the provided information. The root cause is the lack of proper exception handling for certain asynchronous operations, which leads to process crashes under strict unhandled rejection policies. This can result in denial of service conditions for affected applications, impacting availability.

Potential Impact

For European organizations relying on Next.js 12.2.3 in production environments with Node.js versions above 15.0.0, this vulnerability can cause unexpected application downtime due to process crashes triggered by unhandled promise rejections. This primarily impacts the availability of web services, potentially disrupting business operations, customer access, and internal workflows. Organizations using custom server implementations or the 'next start' command in self-managed environments are at risk, whereas those deploying on Vercel or similar managed platforms are not affected. The impact is particularly relevant for sectors with high web service availability requirements such as e-commerce, financial services, healthcare, and public sector digital services. While confidentiality and integrity are not directly compromised by this vulnerability, the denial of service could indirectly affect business continuity and user trust. Given the absence of known exploits, the immediate threat level is moderate, but the potential for denial of service warrants proactive mitigation.

Mitigation Recommendations

European organizations should first identify any applications running Next.js version 12.2.3 with Node.js versions above 15.0.0, especially those using 'next start' or custom server configurations. Immediate mitigation steps include: 1) Upgrading Next.js to a later version where this issue is resolved or applying any vendor-provided patches once available. 2) Reviewing and adjusting Node.js runtime configurations to avoid strict 'unhandledRejection' policies that cause process exit, or implementing robust global exception handlers to catch unhandled promise rejections gracefully. 3) Refactoring custom server implementations to avoid sharing 'next-server' instances across requests, or migrating to deployment environments like Vercel that isolate server instances per request. 4) Implementing process monitoring and automatic restart mechanisms (e.g., using PM2 or systemd) to minimize downtime in case of crashes. 5) Conducting thorough testing of application error handling paths to ensure no unhandled exceptions can cause process termination. These steps go beyond generic advice by focusing on specific configuration and architectural changes relevant to this vulnerability.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
GitHub_M
Date Reserved
2022-07-15T00:00:00.000Z
Cisa Enriched
true

Threat ID: 682d9844c4522896dcbf3be6

Added to database: 5/21/2025, 9:09:24 AM

Last enriched: 6/22/2025, 11:20:54 PM

Last updated: 7/25/2025, 9:01:37 PM

Views: 9

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