CVE-2023-26159: Follow redirects Follow Redirects Improperly Handles URLs Vulnerability
MODERATECVE-2023-26159 is a MODERATE (CVSS 6.1) follow redirects improperly handles urls vulnerability (CWE-20: Improper Input Validation) affecting Follow redirects libraries in the npm ecosystem. The issue involves follow redirects improperly handles urls in the url.parse() function. Remediation is available by upgrading affected packages to version 1.15.4.
CVE-2023-26159 at a Glance
Security Impact
CVSS: 6.1
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:L/A:N).
How to Fix CVE-2023-26159
To remediate this vulnerability, upgrade all affected Follow redirects 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 follow-redirects@1.15.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls follow-redirects
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2023-26159, inspect your project dependencies using npm:
npm ls follow-redirects
Analyze the terminal output to locate any version of Follow redirects in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.15.4), your application is affected.
Note: The npm ls follow-redirects 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 Follow redirects, 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-2023-26159 Affected Follow redirects Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
follow-redirects
|
npm |
< 1.15.4
|
1.15.4
|
References
Frequently Asked Questions
What is CVE-2023-26159?
Which Follow redirects versions are affected?
What version fixes CVE-2023-26159?
Is follow-redirects affected?
What is the CVSS score of CVE-2023-26159?
What CWE is associated with CVE-2023-26159?
How can I check npm dependencies for CVE-2023-26159?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-jchw-25xp-jwwc",
"modified" : "2025-11-04T16:48:07Z",
"published" : "2024-01-02T06:30:30Z",
"aliases" : [ "CVE-2023-26159" ],
"summary" : "Follow Redirects improperly handles URLs in the url.parse() function",
"details" : "Versions of the package follow-redirects before 1.15.4 are vulnerable to Improper Input Validation due to the improper handling of URLs by the url.parse() function. When new URL() throws an error, it can be manipulated to misinterpret the hostname. An attacker could exploit this weakness to redirect traffic to a malicious site, potentially leading to information disclosure, phishing attacks, or other security breaches.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "follow-redirects"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.15.4"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-26159"
}, {
"type" : "WEB",
"url" : "https://github.com/follow-redirects/follow-redirects/issues/235"
}, {
"type" : "WEB",
"url" : "https://github.com/follow-redirects/follow-redirects/pull/236"
}, {
"type" : "WEB",
"url" : "https://github.com/follow-redirects/follow-redirects/commit/7a6567e16dfa9ad18a70bfe91784c28653fbf19d"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/follow-redirects/follow-redirects"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZZ425BFKNBQ6AK7I5SAM56TWON5OF2XM"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20241108-0002"
}, {
"type" : "WEB",
"url" : "https://security.snyk.io/vuln/SNYK-JS-FOLLOWREDIRECTS-6141137"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20", "CWE-601" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-01-08T22:01:39Z",
"nvd_published_at" : "2024-01-02T05:15:08Z"
}
}