Skip to content

← Public intelligence

npm package

follow-redirects

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

8 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. High, CVSS 8.2npmAmendedPublished

    follow-redirects: Cross-realm sensitiveHeaders arrays are discarded and custom credentials can follow redirects

    CVE-2026-116689 · GHSA-mrwp-f3q8-3g9p

    Affected
    • npm follow-redirects >= 1.16.0, < 1.16.2
    Fixed in
    1.16.2· Vendor fix available
    Issue
    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 46301256333c90b7faac7aa126effe72ec16d16e; the exact npm 1.16.1 artifact reproduced independently. Root cause index.js resets options.sensitiveHeaders when its local isArray() helper returns false. That helper uses value instanceof Array, which depends on realm identity. The same file already uses Array.isArray(options.headers), which correctly recognizes arrays across realms. Suggested remediation Use Array.isArray(value) for…

    Recommended action: Upgrade to 1.16.2 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.com (1)osv.dev (2)Source checked Evidence →
  2. High, CVSS 8.2npmAmendedPublished

    follow-redirects array-form headers bypass cross-origin credential stripping

    CVE-2026-111756 · GHSA-q3jh-wrc6-jgq8

    Affected
    • npm follow-redirects >= 1.16.0, < 1.16.1
    Fixed in
    1.16.1· Vendor fix available
    Issue
    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 values. For an array, for...in yields the numeric indices "0", "1", "2" and so on, which never match a header-name filter, so nothing is removed. An application that sends array-form headers and follows an attacker-controlled cross-origin redirect therefore forwards its Authorization, Cookie, and Proxy-Authorization headers verbatim to the attacker-controlled destination, with no error or warning. The…

    Recommended action: Upgrade to 1.16.1 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.com (1)osv.dev (2)Source checked Evidence →
  3. High, CVSS 8.2npmAmendedPublished

    follow-redirects sensitiveHeaders regex escaping can expose credential headers

    CVE-2026-111755 · GHSA-8r9p-f939-6h3c

    Affected
    • npm follow-redirects >= 1.16.0, < 1.16.1
    Fixed in
    1.16.1· Vendor fix available
    Issue
    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 | (both are valid RFC 9110 token characters that Node accepts and sends), and for a declared name containing either, the generated pattern can never match the intended header. As a result, an application that adopts this option to protect a custom credential header, then follows an attacker-controlled cross-origin redirect, forwards that credential to the attacker with no error or warning, while believing it is…

    Recommended action: Upgrade to 1.16.1 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.com (1)osv.dev (2)Source checked Evidence →
  4. Medium, CVSS 6.9npmAmendedPublished

    follow-redirects leaks Custom Authentication Headers to Cross-Domain Redirect Targets

    CVE-2026-40895 · GHSA-r4q5-vmmm-2653

    Affected
    • npm follow-redirects < 1.16.0
    Fixed in
    1.16.0· Vendor fix available
    Issue
    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 !== currentUrlParts.protocol && redirectUrl.protocol !== "https:" || redirectUrl.host !== currentHost && !isSubdomain(redirectUrl.host, currentHost)) { removeMatchingHeaders(/^(?:(?:proxy-)?authorization|cookie)$/i, this._options.headers); } ``` The regex only matches `authorization`, `proxy-authorization`, and `cookie`. Custom headers like `X-API-Key` are not matched. Attack Scenario 1. App uses axios with custom…

    Recommended action: Upgrade to 1.16.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  5. Medium, CVSS 6.5npmAmendedPublished

    follow-redirects' Proxy-Authorization header kept across hosts

    CVE-2024-28849 · GHSA-cxjh-pqwp-8mfp

    Affected
    • npm follow-redirects <= 1.15.5
    Fixed in
    1.15.6· Vendor fix available
    Issue
    When using 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: When I meet the cross-domain redirect, the sensitive headers like authorization and cookie are cleared, but proxy-authentication header is kept. Impact This vulnerability may lead to credentials leak. Recommendations Remove proxy-authentication header during cross-domain redirect Recommended Patch follow-redirects/index.js:464

    Recommended action: Upgrade to 1.15.6 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  6. Medium, CVSS 6.1npmAmendedPublished

    Follow Redirects improperly handles URLs in the url.parse() function

    CVE-2023-26159 · GHSA-jchw-25xp-jwwc

    Affected
    • npm follow-redirects < 1.15.4
    Fixed in
    1.15.4· Vendor fix available
    Issue
    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.

    Recommended action: Upgrade to 1.15.4 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  7. Medium, CVSS 5.9npmAmendedPublished

    Exposure of Sensitive Information to an Unauthorized Actor in follow-redirects

    CVE-2022-0536 · GHSA-pw2r-vq6v-hr8c

    Affected
    • npm follow-redirects < 1.14.8
    Fixed in
    1.14.8· Vendor fix available
    Issue
    Exposure of Sensitive Information to an Unauthorized Actor in NPM follow-redirects prior to 1.14.8.

    Recommended action: Upgrade to 1.14.8 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  8. High, CVSS 8.0npmAmendedPublished

    Exposure of sensitive information in follow-redirects

    CVE-2022-0155 · GHSA-74fj-2j2h-c42q

    Affected
    • npm follow-redirects < 1.14.7
    Fixed in
    1.14.7· Vendor fix available
    Issue
    follow-redirects is vulnerable to Exposure of Private Personal Information to an Unauthorized Actor

    Recommended action: Upgrade to 1.14.7 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →