CVE-2021-43803: Next Unexpected Server Crash Vulnerability
HIGHCVE-2021-43803 is a HIGH (CVSS 7.5) unexpected server crash vulnerability (CWE-20: Improper Input Validation) 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.0.5, 11.1.3.
CVE-2021-43803 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2021-43803
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.0.5
npm install next@11.1.3
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-2021-43803, 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.0.5), 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-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. 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-2021-43803 Affected Next Versions
2 component(s)References
Frequently Asked Questions
What is CVE-2021-43803?
Which Next versions are affected?
What version fixes CVE-2021-43803?
Is next affected?
What is the CVSS score of CVE-2021-43803?
What CWE is associated with CVE-2021-43803?
How can I check npm dependencies for CVE-2021-43803?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-25mp-g6fv-mqxx",
"modified" : "2024-03-13T22:14:17Z",
"published" : "2021-12-07T21:12:09Z",
"aliases" : [ "CVE-2021-43803" ],
"summary" : "Unexpected server crash in Next.js.",
"details" : "Next.js is a React framework. In versions of Next.js prior to 12.0.5 or 11.1.3, invalid or malformed URLs could lead to a server crash. In order to be affected by this issue, the deployment must use Next.js versions above 11.1.0 and below 12.0.5, Node.js above 15.0.0, and next start or a custom server. Deployments on Vercel are not affected, along with similar environments where invalid requests are filtered before reaching Next.js. Versions 12.0.5 and 11.1.3 contain patches for this issue. Note that prior version 0.9.9 package `next` hosted a different utility (0.4.1 being the latest version of that codebase), and this advisory does not apply to those versions. ",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "next"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "12.0.0"
}, {
"fixed" : "12.0.5"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "next"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.9.9"
}, {
"fixed" : "11.1.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/vercel/next.js/security/advisories/GHSA-25mp-g6fv-mqxx"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-43803"
}, {
"type" : "WEB",
"url" : "https://github.com/vercel/next.js/pull/32080"
}, {
"type" : "WEB",
"url" : "https://github.com/vercel/next.js/commit/6d98b4fb4315dec1badecf0e9bdc212a4272b264"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/vercel/next.js"
}, {
"type" : "WEB",
"url" : "https://github.com/vercel/next.js/releases/tag/v11.1.3"
}, {
"type" : "WEB",
"url" : "https://github.com/vercel/next.js/releases/v12.0.5"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2021-12-06T19:17:55Z",
"nvd_published_at" : "2021-12-10T00:15:00Z"
}
}