Automatic redirects can send the API key to a non-EmpirioLabs host, contradicting the documented credential restriction.
- Category
- Excessive Agency
- Confidence
- 99% confidence
- Finding
The code checks the initial URL before attaching Authorization, but urllib.request.urlopen follows redirects and can carry that header to a different host without repeating the check. If an authenticated API response redirects to an attacker-controlled destination, the API key could be exposed and used for unauthorized API access or billable requests; this requires control over or influence on such a redirect.
- Content
