The API-host-only credential guarantee is violated by automatic cross-host redirects.
- Category
- Excessive Agency
- Confidence
- 99% confidence
- Finding
The initial URL is checked before adding Authorization, but urllib's default redirect handler can forward that header to a different host without repeating the check. If an authenticated API endpoint issues an attacker-influenced redirect, the API key can be disclosed to the redirect destination; HTTPS on the original request does not prevent this.
- Content
