CVE-2026-114137: Django REST framework: TokenProxy.delete() reports success and revokes nothing
Django REST framework is a toolkit for building Web APIs. From 3.12.0 until 3.18.2, TokenProxy.delete() in restframework/authtoken/models.py uses the proxy's user-id pk while the concrete Token token-string primary key identifies rows, so Django issues a deletion query that matches no row and reports zero deletions without raising an error. Applications, administrative integrations, or operational scripts that revoke credentials through a TokenProxy instance can therefore believe revocation succeeded while the token remains live and continues authenticating. DRF's own TokenAdmin.deletemodel workaround is not affected, but other callers can leave access available indefinitely because DRF tokens do not expire automatically. This issue is fixed in version 3.18.2.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Django REST frameworkto a version that resolves this vulnerability.Fixed in 3.18.2
Event History
Frequently Asked Questions
Which deployments are affected?
Deployments using Django REST framework from 3.12.0 through 3.18.2 are affected if an application, administrative integration, or operational script revokes credentials by calling delete() on a TokenProxy instance. DRF's TokenAdmin.delete_model workaround is not affected.
What must an attacker have to retain access?
The attacker must possess a token that an affected revocation workflow attempted to delete through TokenProxy.delete(). Because the token can remain live, it can continue authenticating until it is revoked by another method.
What should teams do if they cannot upgrade immediately?
Do not rely on TokenProxy.delete() for revocation. Use a deletion method that targets the concrete Token record, and review tokens that were previously believed revoked through affected callers because DRF tokens do not expire automatically.
How can we identify potentially failed revocations?
Review applications, integrations, and scripts for TokenProxy.delete() usage, and identify revocation attempts made while running versions 3.12.0 through 3.18.2. Tokens associated with those attempts may still be active even if the caller reported success.