follow-redirects' Proxy-Authorization header kept across hosts
Moderate severity
GitHub Reviewed
Published
Mar 14, 2024
in
follow-redirects/follow-redirects
•
Updated Apr 2, 2024
Description
Published by the National Vulnerability Database
Mar 14, 2024
Published to the GitHub Advisory Database
Mar 14, 2024
Reviewed
Mar 14, 2024
Last updated
Apr 2, 2024
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
References