follow-redirects is vulnerable to Exposure of Sensitive Information to an Unauthorized Actor
58
CVE Score
Medium
Exposure of Sensitive Information to an Unauthorized Actor
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.
Upgrade the follow-redirects library to the patch version.
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.
1.11.0 - 1.16.0
Fixed in 1.16.1follow-redirects is vulnerable to Exposure of Sensitive Information to an Unauthorized Actor in versions 1.11.0 - 1.16.0.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
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.