The API-key host restriction documented at L007–L009 is not enforced across HTTP redirects.
- Category
- Excessive Agency
- Confidence
- 99% confidence
- Finding
The code checks the initial URL before attaching the API key, but urllib's default redirect handling can carry the Authorization header to a different host. An API-host response redirecting to an attacker-controlled destination could therefore disclose the key, enabling unauthorized API usage and charges.
- Content
