Intel

AIKIDO-2026-600799

django-oauth-toolkit is vulnerable to Use of Insufficiently Random Values

Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Jul 28, 2026
July 28, 2026

53

CVE Score

Medium

Use of Insufficiently Random Values

Are you affected? Scan for Free

TL;DR

The OAuth 2.0 device authorization grant generates the user_code credential with the non-cryptographic random module (Mersenne Twister), whose output is predictable once its internal state is inferred. The device views look up pending grants solely by user_code, so a guessable code lets an attacker bind or hijack a device authorization. The fix draws each character from the cryptographically secure secrets module as required by RFC 8628.

How do I fix this?

Upgrade the django-oauth-toolkit library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and your deployment enables the OAuth 2.0 device authorization grant.

Versions

3.2.0 - 3.3.0

Fixed in 3.4.0

Background info

django-oauth-toolkit is vulnerable to Use of Insufficiently Random Values in versions 3.2.0 - 3.3.0.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea