follow-redirects is vulnerable to Exposure of Sensitive Information to an Unauthorized Actor
58
Medium Risk
follow-redirects strips Authorization, Cookie, Proxy-Authorization, and any declared sensitiveHeaders before a redirect to a different host or a protocol downgrade by looping over the headers object with for...in in removeMatchingHeaders. When an application supplies headers as an array (the alternating name/value form Node's http.request also accepts), for...in yields numeric indices instead of header names, so the filter never matches and nothing is stripped. The request to the new destination still includes those credential headers, with no error or warning. The fix converts headers in array form to a plain object before the sensitive header filter runs.
You are affected if you are using a version that falls within the vulnerable range and you supply request headers as an array rather than a plain object while following redirects.
follow-redirects is vulnerable to Exposure of Sensitive Information to an Unauthorized Actor in versions 1.11.0 - 1.16.0.
Upgrade the follow-redirects library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.