CVE-2023-26159: Follow redirects Follow Redirects Improperly Handles URLs Vulnerability

MODERATE
Advisory Identifier: GHSA-jchw-25xp-jwwc
CVSS 6.1
CWE-20 CWE-601
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2023-26159
GHSA Identifier GHSA-jchw-25xp-jwwc
Severity MODERATE
CVSS v3.1 Base Score 6.1
CWE Classification CWE-20: Improper Input Validation
Affected Product Follow redirects
Package Ecosystem npm
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (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.

follow-redirects fixed: 1.15.4
npm install follow-redirects@1.15.4
Verify Direct and Transitive Dependencies

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

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.

CVE-2023-26159 Affected Follow redirects Versions

1 component(s)
Fixed Versions:
1.15.4
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?
CVE-2023-26159 is a security vulnerability in Follow redirects involving Follow Redirects improperly handles URLs in the url.parse() function under CWE-20: Improper Input Validation.
Which Follow redirects versions are affected?
Affected versions include releases prior to 1.15.4 across affected packages: follow-redirects.
What version fixes CVE-2023-26159?
Upgrading to 1.15.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is follow-redirects affected?
Yes, follow-redirects is affected in releases prior to 1.15.4. Upgrade your dependency to 1.15.4 or later.
What is the CVSS score of CVE-2023-26159?
CVE-2023-26159 has a CVSS v3.1 base score of 6.1 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2023-26159?
CVE-2023-26159 is classified under CWE-20: Improper Input Validation (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.).
How can I check npm dependencies for CVE-2023-26159?
Run the dependency tree command: 'npm ls follow-redirects'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}