CVE-2020-15242: Next Open Redirect Vulnerability
MODERATECVE-2020-15242 is a MODERATE (CVSS 4.7) open redirect vulnerability (CWE-601: URL Redirection to Untrusted Site ('Open Redirect')) affecting Next libraries in the npm ecosystem. The issue involves open redirect in next.js versions. Remediation is available by upgrading affected packages to version 9.5.4.
CVE-2020-15242 at a Glance
Security Impact
CVSS: 4.7
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:R/S:C/C:L/I:N/A:N).
How to Fix CVE-2020-15242
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@9.5.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-2020-15242, 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 9.5.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-601: URL Redirection to Untrusted Site ('Open Redirect'), where the web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect. 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-2020-15242 Affected Next Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
next
|
npm |
≥ 9.5.0
< 9.5.4
|
9.5.4
|
References
Frequently Asked Questions
What is CVE-2020-15242?
Which Next versions are affected?
What version fixes CVE-2020-15242?
Is next affected?
What is the CVSS score of CVE-2020-15242?
What CWE is associated with CVE-2020-15242?
How can I check npm dependencies for CVE-2020-15242?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-x56p-c8cg-q435",
"modified" : "2021-10-06T21:27:19Z",
"published" : "2020-10-08T19:28:07Z",
"aliases" : [ "CVE-2020-15242" ],
"summary" : "Open Redirect in Next.js versions",
"details" : "### Impact\n\n- **Affected**: Users of Next.js between 9.5.0 and 9.5.3 \n- **Not affected**: Deployments on Vercel ([https://vercel.com](https://vercel.com)) are not affected\n- **Not affected**: Deployments using `next export`\n\nWe recommend everyone to upgrade regardless of whether you can reproduce the issue or not.\n\n### Patches\n\nhttps://github.com/vercel/next.js/releases/tag/v9.5.4\n\n### References\n\nhttps://github.com/vercel/next.js/releases/tag/v9.5.4\n\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "next"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "9.5.0"
}, {
"fixed" : "9.5.4"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/vercel/next.js/security/advisories/GHSA-x56p-c8cg-q435"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-15242"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/vercel/next.js"
}, {
"type" : "WEB",
"url" : "https://github.com/zeit/next.js/releases/tag/v9.5.4"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-601" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2020-10-08T19:27:38Z",
"nvd_published_at" : null
}
}