CVE-2026-15337: CWE-789: Memory Allocation with Excessive Size Value in djangoproject Django
An issue was discovered in Django 5.2 before 5.2.17 and 6.0 before 6.0.8. `django.utils.translation.check_for_language()` is subject to a potential denial-of-service attack when given many distinct, very long language codes, which are retained as keys in an in-memory cache and consume process memory. Such codes reach the function through the `django.views.i18n.set_language()` view, which is not routed by default. The consumed memory is bounded, since request data is limited by the `DATA_UPLOAD_MAX_MEMORY_SIZE` setting (default 2.5 MB) and the cache holds a fixed maximum number of entries. Earlier, unsupported Django series (such as 5.1.x, 5.0.x, and 4.2.x) were not evaluated and may also be affected. Django would like to thank Jaeyoung Jang for reporting this issue.
AI Analysis
Technical Summary
This vulnerability in Django affects the check_for_language() function that caches language codes in memory. When an attacker supplies many distinct, very long language codes through the set_language() view, the in-memory cache grows, consuming excessive memory and potentially causing a denial-of-service. The attack surface is limited because the set_language() view is not routed by default and request size is capped by DATA_UPLOAD_MAX_MEMORY_SIZE (default 2.5 MB). The cache also holds a fixed maximum number of entries, bounding memory use. The issue affects Django 5.2 versions prior to 5.2.17 and 6.0 versions prior to 6.0.8. No official remediation level or patch links are provided in the data, so patch status is not confirmed. Earlier unsupported versions may also be vulnerable but were not assessed.
Potential Impact
The impact is a denial-of-service condition caused by excessive memory consumption in the Django process. This can degrade service availability but does not affect confidentiality or integrity. The attack requires sending many distinct, very long language codes to the set_language() view, which is not enabled by default, limiting exposure. Memory consumption is bounded by request size limits and cache size, reducing the risk of complete system failure.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Since the set_language() view is not routed by default, disabling or not enabling this view reduces exposure. Additionally, the default DATA_UPLOAD_MAX_MEMORY_SIZE setting limits request size, bounding memory consumption. Monitor vendor channels for official patches or updates and apply them once available.
CVE-2026-15337: CWE-789: Memory Allocation with Excessive Size Value in djangoproject Django
Description
An issue was discovered in Django 5.2 before 5.2.17 and 6.0 before 6.0.8. `django.utils.translation.check_for_language()` is subject to a potential denial-of-service attack when given many distinct, very long language codes, which are retained as keys in an in-memory cache and consume process memory. Such codes reach the function through the `django.views.i18n.set_language()` view, which is not routed by default. The consumed memory is bounded, since request data is limited by the `DATA_UPLOAD_MAX_MEMORY_SIZE` setting (default 2.5 MB) and the cache holds a fixed maximum number of entries. Earlier, unsupported Django series (such as 5.1.x, 5.0.x, and 4.2.x) were not evaluated and may also be affected. Django would like to thank Jaeyoung Jang for reporting this issue.
CVSS v3.1
Score 5.3medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
This vulnerability in Django affects the check_for_language() function that caches language codes in memory. When an attacker supplies many distinct, very long language codes through the set_language() view, the in-memory cache grows, consuming excessive memory and potentially causing a denial-of-service. The attack surface is limited because the set_language() view is not routed by default and request size is capped by DATA_UPLOAD_MAX_MEMORY_SIZE (default 2.5 MB). The cache also holds a fixed maximum number of entries, bounding memory use. The issue affects Django 5.2 versions prior to 5.2.17 and 6.0 versions prior to 6.0.8. No official remediation level or patch links are provided in the data, so patch status is not confirmed. Earlier unsupported versions may also be vulnerable but were not assessed.
Potential Impact
The impact is a denial-of-service condition caused by excessive memory consumption in the Django process. This can degrade service availability but does not affect confidentiality or integrity. The attack requires sending many distinct, very long language codes to the set_language() view, which is not enabled by default, limiting exposure. Memory consumption is bounded by request size limits and cache size, reducing the risk of complete system failure.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Since the set_language() view is not routed by default, disabling or not enabling this view reduces exposure. Additionally, the default DATA_UPLOAD_MAX_MEMORY_SIZE setting limits request size, bounding memory consumption. Monitor vendor channels for official patches or updates and apply them once available.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- DSF
- Date Reserved
- 2026-07-09T19:29:06.768Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a72133ebf8831d5391ad451
Added to database: 08/04/2026, 16:28:46 UTC
Last enriched: 08/04/2026, 16:47:11 UTC
Last updated: 08/04/2026, 18:48:39 UTC
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.