follow-redirects

Ecosystem: npm

Downloads: 475.45 Mln

Vulnerabilities from the last (months)
  • 0CriticalAffects 0 versions
  • 4HighAffects 4 versions
  • 0MediumAffects 0 versions
  • 4ModerateAffects 4 versions
  • 0LowAffects 0 versions
Severity distribution (all time)
8vulnerabilities
  • Critical0 (0.0%)
  • High4 (50.0%)
  • Medium0 (0.0%)
  • Moderate4 (50.0%)
  • Low0 (0.0%)

Monthly breakdown

  • Critical
  • High
  • Medium
  • Moderate
  • Low
  • 3 vulnerabilities
    • Critical: 0
    • High: 3
    • Medium: 0
    • Moderate: 0
    • Low: 0
  • 1 vulnerabilities
    • Critical: 0
    • High: 0
    • Medium: 0
    • Moderate: 1
    • Low: 0
  • 1 vulnerabilities
    • Critical: 0
    • High: 0
    • Medium: 0
    • Moderate: 1
    • Low: 0
  • 1 vulnerabilities
    • Critical: 0
    • High: 0
    • Medium: 0
    • Moderate: 1
    • Low: 0
  • 1 vulnerabilities
    • Critical: 0
    • High: 0
    • Medium: 0
    • Moderate: 1
    • Low: 0
  • 1 vulnerabilities
    • Critical: 0
    • High: 1
    • Medium: 0
    • Moderate: 0
    • Low: 0

Vulnerabilities (8)

Known vulnerabilities affecting follow-redirects, based on data from OSV.

Vulnerabilities affecting follow-redirects
IDSeveritySummaryAffected versionsPublishedSource
GHSA-mrwp-f3q8-3g9pHighfollow-redirects: Cross-realm sensitiveHeaders arrays are discarded and custom credentials can follow redirects### Summary follow-redirects 1.16.0 and 1.16.1 validate the documented sensitiveHeaders option with instanceof Array. An array created in another JavaScript realm is silently replaced with an empty list, so a caller-declared custom credential header can be forwarded to an attacker-controlled cross-origin redirect destination. ### Details Affected versions The sensitiveHeaders option was introduced in 1.16.0. Published 1.16.0 and 1.16.1 both reproduced, giving a tested affected range of 1.16.0 through 1.16.1. The source checkout was pinned at revision 46301256333c90b7faac7aa126effe72ec16d16
  • >= 1.16.0, < 1.16.2
GitHub (opens in a new tab)
GHSA-8r9p-f939-6h3cHighfollow-redirects sensitiveHeaders regex escaping can expose credential headers### Summary follow-redirects 1.16.0 introduced the `sensitiveHeaders` option (the fix for CVE-2026-40895 / GHSA-r4q5-vmmm-2653), which lets an application declare extra header names that must be removed when a redirect crosses to a different host or downgrades protocol. The filter is a single case-insensitive regular expression built by concatenating the declared header names into an alternation after passing each through `escapeRegex`. `escapeRegex` escapes only a partial set of metacharacters and leaves `^`, `|`, `[`, `{`, and `}` unescaped. Header names may legitimately contain `^` and `|`
  • >= 1.16.0, < 1.16.1
GitHub (opens in a new tab)
GHSA-q3jh-wrc6-jgq8Highfollow-redirects array-form headers bypass cross-origin credential stripping### Summary follow-redirects removes sensitive credential headers (Authorization, Proxy-Authorization, Cookie, and any caller-declared `sensitiveHeaders`) before following a redirect that crosses to a different host or downgrades to a less secure protocol. The removal routine iterates the caller's headers container with `for...in` and matches header names against a filter. This assumes the headers container is a plain object keyed by header names. Node's underlying `http.request`, which follow-redirects is a drop-in replacement for, also accepts headers as an alternating array of names and val
  • >= 1.16.0, < 1.16.1
GitHub (opens in a new tab)
GHSA-r4q5-vmmm-2653Moderatefollow-redirects leaks Custom Authentication Headers to Cross-Domain Redirect Targets## Summary When an HTTP request follows a cross-domain redirect (301/302/307/308), `follow-redirects` only strips `authorization`, `proxy-authorization`, and `cookie` headers (matched by regex at index.js:469-476). Any custom authentication header (e.g., `X-API-Key`, `X-Auth-Token`, `Api-Key`, `Token`) is forwarded verbatim to the redirect target. Since `follow-redirects` is the redirect-handling dependency for **axios** (105K+ stars), this vulnerability affects the entire axios ecosystem. ## Affected Code `index.js`, lines 469-476: ```javascript if (redirectUrl.protocol !== currentUrlPar
  • < 1.16.0
GitHub (opens in a new tab)
GHSA-cxjh-pqwp-8mfpModeratefollow-redirects' Proxy-Authorization header kept across hostsWhen using [axios](https://github.com/axios/axios), its dependency follow-redirects only clears authorization header during cross-domain redirect, but allows the proxy-authentication header which contains credentials too. ## Steps To Reproduce & PoC Test code: ```js const axios = require('axios'); axios.get('http://127.0.0.1:10081/', { headers: { 'AuThorization': 'Rear Test', 'ProXy-AuthoriZation': 'Rear Test', 'coOkie': 't=1' } }) .then((response) => { console.log(response); }) ``` When I meet the cross-domain redirect, the sensitive headers like authorization and cookie are clea
  • < 1.15.6
GitHub (opens in a new tab)
GHSA-jchw-25xp-jwwcModerateFollow Redirects improperly handles URLs in the url.parse() functionVersions 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.
  • < 1.15.4
GitHub (opens in a new tab)
GHSA-pw2r-vq6v-hr8cModerateExposure of Sensitive Information to an Unauthorized Actor in follow-redirectsExposure of Sensitive Information to an Unauthorized Actor in NPM follow-redirects prior to 1.14.8.
  • < 1.14.8
GitHub (opens in a new tab)
GHSA-74fj-2j2h-c42qHighExposure of sensitive information in follow-redirectsfollow-redirects is vulnerable to Exposure of Private Personal Information to an Unauthorized Actor
  • < 1.14.7
GitHub (opens in a new tab)
  • GHSA-mrwp-f3q8-3g9pHigh
    follow-redirects: Cross-realm sensitiveHeaders arrays are discarded and custom credentials can follow redirects
    • >= 1.16.0, < 1.16.2

    ### Summary follow-redirects 1.16.0 and 1.16.1 validate the documented sensitiveHeaders option with instanceof Array. An array created in another JavaScript realm is silently replaced with an empty list, so a caller-declared custom credential header can be forwarded to an attacker-controlled cross-origin redirect destination. ### Details Affected versions The sensitiveHeaders option was introduced in 1.16.0. Published 1.16.0 and 1.16.1 both reproduced, giving a tested affected range of 1.16.0 through 1.16.1. The source checkout was pinned at revision 46301256333c90b7faac7aa126effe72ec16d16

    CVE: CVE-2026-116689

  • GHSA-8r9p-f939-6h3cHigh
    follow-redirects sensitiveHeaders regex escaping can expose credential headers
    • >= 1.16.0, < 1.16.1

    ### Summary follow-redirects 1.16.0 introduced the `sensitiveHeaders` option (the fix for CVE-2026-40895 / GHSA-r4q5-vmmm-2653), which lets an application declare extra header names that must be removed when a redirect crosses to a different host or downgrades protocol. The filter is a single case-insensitive regular expression built by concatenating the declared header names into an alternation after passing each through `escapeRegex`. `escapeRegex` escapes only a partial set of metacharacters and leaves `^`, `|`, `[`, `{`, and `}` unescaped. Header names may legitimately contain `^` and `|`

    CVE: CVE-2026-111755

  • GHSA-q3jh-wrc6-jgq8High
    follow-redirects array-form headers bypass cross-origin credential stripping
    • >= 1.16.0, < 1.16.1

    ### Summary follow-redirects removes sensitive credential headers (Authorization, Proxy-Authorization, Cookie, and any caller-declared `sensitiveHeaders`) before following a redirect that crosses to a different host or downgrades to a less secure protocol. The removal routine iterates the caller's headers container with `for...in` and matches header names against a filter. This assumes the headers container is a plain object keyed by header names. Node's underlying `http.request`, which follow-redirects is a drop-in replacement for, also accepts headers as an alternating array of names and val

    CVE: CVE-2026-111756

  • GHSA-r4q5-vmmm-2653Moderate
    follow-redirects leaks Custom Authentication Headers to Cross-Domain Redirect Targets
    • < 1.16.0

    ## Summary When an HTTP request follows a cross-domain redirect (301/302/307/308), `follow-redirects` only strips `authorization`, `proxy-authorization`, and `cookie` headers (matched by regex at index.js:469-476). Any custom authentication header (e.g., `X-API-Key`, `X-Auth-Token`, `Api-Key`, `Token`) is forwarded verbatim to the redirect target. Since `follow-redirects` is the redirect-handling dependency for **axios** (105K+ stars), this vulnerability affects the entire axios ecosystem. ## Affected Code `index.js`, lines 469-476: ```javascript if (redirectUrl.protocol !== currentUrlPar

    CVE: CVE-2026-40895

  • GHSA-cxjh-pqwp-8mfpModerate
    follow-redirects' Proxy-Authorization header kept across hosts
    • < 1.15.6

    When using [axios](https://github.com/axios/axios), its dependency follow-redirects only clears authorization header during cross-domain redirect, but allows the proxy-authentication header which contains credentials too. ## Steps To Reproduce & PoC Test code: ```js const axios = require('axios'); axios.get('http://127.0.0.1:10081/', { headers: { 'AuThorization': 'Rear Test', 'ProXy-AuthoriZation': 'Rear Test', 'coOkie': 't=1' } }) .then((response) => { console.log(response); }) ``` When I meet the cross-domain redirect, the sensitive headers like authorization and cookie are clea

    CVE: CVE-2024-28849

  • GHSA-jchw-25xp-jwwcModerate
    Follow Redirects improperly handles URLs in the url.parse() function
    • < 1.15.4

    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: CVE-2023-26159

  • GHSA-pw2r-vq6v-hr8cModerate
    Exposure of Sensitive Information to an Unauthorized Actor in follow-redirects
    • < 1.14.8

    Exposure of Sensitive Information to an Unauthorized Actor in NPM follow-redirects prior to 1.14.8.

    CVE: CVE-2022-0536

  • GHSA-74fj-2j2h-c42qHigh
    Exposure of sensitive information in follow-redirects
    • < 1.14.7

    follow-redirects is vulnerable to Exposure of Private Personal Information to an Unauthorized Actor

    CVE: CVE-2022-0155

Showing 1-8 of 8 vulnerabilities