Improper Input Validation in follow-redirects

follow-redirects Updated 02 Oct 2025

Summary

02/01/2024
Yes i
Moderate
6.1

CVE-2023-26159: Follow Redirects improperly handles URLs in the url.parse() function. Affects follow-redirects versions < 1.15.4. Fixed in 1.15.4. How to fix ↓

Also tracked for

The same CVE-2023-26159 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The follow-redirects package is an npm module that provides a way to handle HTTP redirects in Node.js applications. It is commonly used to follow HTTP redirects and retrieve the final response. However, versions before 1.15.4 of the package are vulnerable to an Improper Input Validation issue.

Vulnerability Detail

The vulnerability in follow-redirects stems from the improper handling of URLs by the url.parse() function. When a new URL() throws an error, it can be manipulated to misinterpret the hostname. This weakness can be exploited by an attacker to redirect traffic to a malicious site, potentially leading to information disclosure, phishing attacks, or other security breaches. The vulnerability has a CVSSv3 score of 7.3, indicating a high severity.

How To Fix

Latest published version: 1.16.1 as of 22 Oct 2026

npm install follow-redirects@1.16.1

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.15.4

This is the first release that contains the fix.

npm install follow-redirects@1.15.4

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is recommended to update the package to the latest version as soon as possible.

Conclusion

The follow-redirects package is vulnerable to an Improper Input Validation issue that can be exploited by attackers to redirect traffic to malicious sites. It is crucial to update the package to version 1.15.4 or later to mitigate this vulnerability. For further support on vulnerability remediation, contact DevNack.com.

See every vulnerability recorded for follow-redirects →

Share this vulnerability

FAQ

follow-redirects is an npm module used to handle HTTP redirects in Node.js applications.

Versions before 1.15.4 of the follow-redirects package are affected.

This vulnerability can be exploited by an attacker to redirect traffic to a malicious site, potentially leading to information disclosure, phishing attacks, or other security breaches.

To fix this vulnerability, update the follow-redirects package to version 1.15.4 or later by running the command: npm install follow-redirects@latest

There is no known workaround for this vulnerability. It is recommended to update the package to the latest version.

Related vulnerabilities

Recent vulnerabilities recorded for follow-redirects.

How To Fix

Latest published version: 1.16.1 as of 22 Oct 2026

npm install follow-redirects@1.16.1

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.15.4

This is the first release that contains the fix.

npm install follow-redirects@1.15.4

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback