Technical impact
The follow-redirects Node.js HTTP/HTTPS client wrapper incorrectly handles sensitiveHeaders arrays that are created in a different JavaScript realm. From version 1.16.0 up to but not including 1.16.2, the check uses instanceof Array, which replaces such cross-realm arrays with an empty list. When a request follows an attacker-controlled redirect, a custom credential header listed in the discarded array can be forwarded to the redirect destination, potentially exposing private credentials or authentication tokens to unintended parties.
Affected Systems
This vulnerability impacts applications that import the follow-redirects library and use sensitiveHeaders configurations in versions 1.16.0 through 1.16.1. Legacy installations or environments that rely on these versions should be upgraded to 1.16.2 or later to eliminate the risk.
Risk and Exploitability
The CVSS score of 5.9 indicates a medium severity problem. The EPSS score is 0.00266 and the vulnerability is not listed in the CISA KEV catalog. An attacker needs to control the redirect target and supply a cross-realm array in the sensitiveHeaders option to trigger the flaw. Successful exploitation would allow the attacker to cause confidential headers to be forwarded to a third‑party domain, leading to potential credential leakage.
Github GHSA