django is vulnerable to Denial of Service (DoS)
35
CVE Score
Low
Denial of Service (DoS)
The entry point is django.utils.translation.trans_real.get_supported_language_variant(), which is reached whenever Django resolves a client-supplied language code (e.g., from the Accept-Language header, a locale-prefixed URL, or the language cookie) during request processing. Before the fix, every distinct lang_code value, including arbitrarily long attacker-controlled strings, was cached by an lru_cache(maxsize=1000) wrapping the full function, and no truncation occurred before caching, so many unique long codes could consume significant process memory via cache retention and large repeated string keys. The fix moves caching to _get_supported_language_variant() and rejects or truncates codes longer than LANGUAGE_CODE_MAX_LENGTH before that lookup.
Upgrade the django library to the patch version.
You are affected if you are using a version that falls within the vulnerable range and you resolve a client-supplied language code through LocaleMiddleware, a locale-prefixed URL, or the language cookie.
5.2 - 5.2.17
Fixed in 5.2.186.0 - 6.0.8
Fixed in 6.0.96.1 - 6.1.1
Fixed in 6.1.2django is vulnerable to Denial of Service (DoS) in versions 6.1 - 6.1.1, 6.0 - 6.0.8 and 5.2 - 5.2.17.
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.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.