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 arises from the django.utils.translation.check_for_language() function retaining many distinct, very long language codes as keys in an in-memory cache, which can cause excessive memory consumption and a denial-of-service condition. The language codes reach this function through the django.views.i18n.set_language() view, which is not enabled by default. The memory usage is bounded by the DATA_UPLOAD_MAX_MEMORY_SIZE setting (default 2.5 MB) and a fixed maximum number of cache entries. The issue affects Django 5.2 versions prior to 5.2.17 and Django 6.0 versions prior to 6.0.8. Earlier unsupported versions such as 5.1.x, 5.0.x, and 4.2.x were not evaluated but may also be vulnerable. No official remediation level or patch information is provided in the advisory.
Potential Impact
The vulnerability can lead to denial-of-service by causing the Django process to consume excessive memory when handling many distinct, very long language codes. This can degrade service availability. There is no impact on confidentiality or integrity. The attack vector is network-based with no privileges required and no user interaction needed. The affected view is not routed by default, which reduces exposure. Memory consumption is limited by existing Django settings and cache size, bounding the impact.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Since the vulnerable view django.views.i18n.set_language() is not routed by default, exposure can be minimized by not enabling this view. Additionally, the default DATA_UPLOAD_MAX_MEMORY_SIZE setting limits memory consumption. Monitor vendor updates for official patches or fixes and apply them when 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
djangoproject
Django
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 arises from the django.utils.translation.check_for_language() function retaining many distinct, very long language codes as keys in an in-memory cache, which can cause excessive memory consumption and a denial-of-service condition. The language codes reach this function through the django.views.i18n.set_language() view, which is not enabled by default. The memory usage is bounded by the DATA_UPLOAD_MAX_MEMORY_SIZE setting (default 2.5 MB) and a fixed maximum number of cache entries. The issue affects Django 5.2 versions prior to 5.2.17 and Django 6.0 versions prior to 6.0.8. Earlier unsupported versions such as 5.1.x, 5.0.x, and 4.2.x were not evaluated but may also be vulnerable. No official remediation level or patch information is provided in the advisory.
Potential Impact
The vulnerability can lead to denial-of-service by causing the Django process to consume excessive memory when handling many distinct, very long language codes. This can degrade service availability. There is no impact on confidentiality or integrity. The attack vector is network-based with no privileges required and no user interaction needed. The affected view is not routed by default, which reduces exposure. Memory consumption is limited by existing Django settings and cache size, bounding the impact.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Since the vulnerable view django.views.i18n.set_language() is not routed by default, exposure can be minimized by not enabling this view. Additionally, the default DATA_UPLOAD_MAX_MEMORY_SIZE setting limits memory consumption. Monitor vendor updates for official patches or fixes and apply them when 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
Threat ID: 6a72133ebf8831d5391ad451
Added to database: 08/04/2026, 16:28:46 UTC
Last enriched: 08/11/2026, 18:13:24 UTC
Last updated: 09/19/2026, 10:01:30 UTC
Views: 40
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.