CVE-2022-36046: Next Unexpected Server Crash Vulnerability
MODERATECVE-2022-36046 is a MODERATE (CVSS 5.3) unexpected server crash vulnerability (CWE-754: Improper Check for Unusual or Exceptional Conditions) affecting Next libraries in the npm ecosystem. The issue involves unexpected server crash in next.js. Remediation is available by upgrading affected packages to version 12.2.4.
CVE-2022-36046 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2022-36046
To remediate this vulnerability, upgrade all affected Next dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install next@12.2.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls next
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2022-36046, inspect your project dependencies using npm:
npm ls next
Analyze the terminal output to locate any version of Next in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 12.2.4), your application is affected.
Note: The npm ls next command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-754: Improper Check for Unusual or Exceptional Conditions, where the product does not check or incorrectly checks for unusual or exceptional conditions that are not expected to occur frequently during day to day operation of the product. In Next, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2022-36046 Affected Next Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
next
|
npm |
≥ 12.2.3
< 12.2.4
All 1 versions
12.2.3
|
12.2.4
|
References
Frequently Asked Questions
What is CVE-2022-36046?
Which Next versions are affected?
What version fixes CVE-2022-36046?
Is next affected?
What is the CVSS score of CVE-2022-36046?
What CWE is associated with CVE-2022-36046?
How can I check npm dependencies for CVE-2022-36046?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-wff4-fpwg-qqv3",
"modified" : "2022-09-08T14:17:38Z",
"published" : "2022-08-30T20:38:34Z",
"aliases" : [ "CVE-2022-36046" ],
"summary" : "Unexpected server crash in Next.js",
"details" : "### Impact\n\nWhen specific requests are made to the Next.js server it can cause an `unhandledRejection` in the server which can crash the process to exit in specific Node.js versions with strict `unhandledRejection` handling. \n\n- Affected: All of the following must be true to be affected by this CVE\n - Node.js version above v15.0.0 being used with strict `unhandledRejection` exiting\n - Next.js version v12.2.3\n - Using next start or a [custom server](https://nextjs.org/docs/advanced-features/custom-server)\n \n- Not affected: Deployments on Vercel ([vercel.com](https://vercel.com/)) are not affected along with similar environments where `next-server` isn't being shared across requests.\n\n### Patches\nhttps://github.com/vercel/next.js/releases/tag/v12.2.4\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "next"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "12.2.3"
}, {
"fixed" : "12.2.4"
} ]
} ],
"versions" : [ "12.2.3" ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/vercel/next.js/security/advisories/GHSA-wff4-fpwg-qqv3"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-36046"
}, {
"type" : "WEB",
"url" : "https://github.com/vercel/next.js/releases/tag/v12.2.4"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-248", "CWE-754" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-08-30T20:38:34Z",
"nvd_published_at" : "2022-08-31T19:15:00Z"
}
}