Details
- axios 1.13.6
- follow-redirects 1.15.11
- an authenticated proxy applying to the initial HTTP request
- no proxy applying to the redirected HTTPS URL
- redirects enabled
- an HTTP-to-HTTPS redirect that is treated as same-host by the redirect layer
Observed behavior
- The initial HTTP request is sent through the proxy and includes
Proxy-Authorization. - The redirected HTTPS request is sent directly to the final origin.
- The redirected HTTPS request still includes the previously generated
Proxy-Authorizationheader. - The final origin can receive a
Proxy-Authorizationheader value that was intended only for the proxy.
Expected behavior
Axios should not send the Proxy-Authorization header on a redirected request that is no longer sent through a proxy.
Impact
Under the affected redirect and proxy configuration, the final HTTPS origin may receive a retained Proxy-Authorization header value that was intended only for the outbound proxy.
If that credential is valid and reusable, and the outbound proxy is reachable by the attacker, the attacker may be able to authenticate to that proxy with the affected environment’s proxy credential, subject to the credential’s scope and the proxy’s access controls.
</details>
---