Skip to main content
EPSS 1.0%top 38%

CVE-2026-15337: CWE-789: Memory Allocation with Excessive Size Value in djangoproject Django

0
Medium
Published: 08/19/2026 (08/19/2026, 08:39:52 UTC)
Source: CVE Database V5
Vendor/Project: djangoproject
Product: 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

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Affected software

djangoproject

Django

Affected versions
>=6.0 <6.0.8>=5.2 <5.2.17
django
pkg:pypi/django
Affected versions
>=6.0 <6.0.8>=5.2 <5.2.17

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 08/11/2026, 18:13:24 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses