CVE-2026-40895
follow-redirects: follow-redirects: Information disclosure via cross-domain redirects
Severity
ImportantRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · April 22, 2026
Updated · November 5, 2026
Description
A flaw was found in follow-redirects. When an HTTP request follows a cross-domain redirect (a redirection to a different domain), custom authentication headers, such as X-API-Key or X-Auth-Token, are not properly stripped. This allows these sensitive headers to be forwarded verbatim to the redirect target, potentially leading to the unintended disclosure of authentication information to an untrusted third party.
Statement
This Important impact information disclosure vulnerability in the follow-redirects npm package allows custom authentication headers (such as X-API-Key or X-Auth-Token) to be forwarded verbatim when HTTP requests follow cross-domain redirects. Applications that pass sensitive authentication headers while using follow-redirects may inadvertently expose those credentials to untrusted redirect targets.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.
CVSS / CWE
CVSS 3.1 · 7.5CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
CWE-212 · Improper Removal of Sensitive Information Before Storage or Transfer