django-tastypie ApiKeyAuthentication Vulnerability Allowing Credential Exposure via URL Parameters

Vulnerability

A vulnerability exists in django-tastypie versions through 0.15.1, specifically within the ApiKeyAuthentication function in authentication.py. This issue allows for the remote exploitation of GET or POST request methods to include sensitive query strings, such as API credentials. The vulnerability arises from the authentication method's acceptance of credentials via URL parameters when no Authorization header is provided, potentially leading to API key leakage.

Impact

Exploiting this vulnerability allows for API keys to be extracted from the application's access logs, browser history, referrer headers, and shared URLs. This could enable unauthorized users to impersonate the API key owner.

Reproduction

To reproduce this vulnerability, use django-tastypie version 0.15.1 and authenticate an API request by including the 'username' and 'api_key' parameters in the URL or as POST fields, instead of using the 'Authorization' header'.

Remediation

It is recommended to remove the fallback for GET/POST credential acceptance in ApiKeyAuthentication, or to require an explicit opt-in for this feature. Throttle management should be improved with atomic cache operations to prevent bypassing rate limits.

Added: Jul 19, 2026, 4:30 AM
Updated: Jul 19, 2026, 4:30 AM

Vulnerability Rating

Custom Algorithm
spread
3.1
impact
3.1
exploitability
6.6
remediation
0.0
relevance
9.7
threat
6.4
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.