CVE-2026-53878: CWE-144: Improper Neutralization of Line Delimiters in djangoproject Django
An issue was discovered in Django 6.0 before 6.0.7 and 5.2 before 5.2.16. `DomainNameValidator` does not prohibit newlines in domain names (unless used via a form field, since `CharField` strips newlines). If an application uses values with newlines in an HTTP response, header injection can occur. Django itself is unaffected because `HttpResponse` prohibits newlines in HTTP headers. Earlier, unsupported Django series (such as 5.0.x, 4.1.x, and 3.2.x) were not evaluated and may also be affected. Django would like to thank Bence Nagy for reporting this issue.
AI Analysis
Technical Summary
This vulnerability arises because the DomainNameValidator in Django versions 6.0 prior to 6.0.7 and 5.2 prior to 5.2.16 does not restrict newline characters in domain name inputs. If an application uses such domain names containing newlines in HTTP response headers, it could lead to HTTP header injection. However, Django's HttpResponse class inherently blocks newlines in headers, mitigating direct exploitation within Django itself. The vulnerability was reported by Bence Nagy. Unsupported older Django versions (5.0.x, 4.1.x, 3.2.x) were not assessed and might also be vulnerable. A fix has been released in the updated versions.
Potential Impact
The vulnerability could allow HTTP header injection if an application improperly uses domain names containing newline characters in HTTP response headers. This can lead to partial compromise of HTTP response integrity, potentially affecting confidentiality and integrity of HTTP communications. However, since Django's HttpResponse class prohibits newlines in headers, the framework itself is not directly exploitable. The impact is limited to applications that bypass or do not use Django's standard HTTP response handling.
Mitigation Recommendations
A patch is available in Django versions 6.0.7 and 5.2.16 that addresses this issue by properly prohibiting newlines in domain names validated by DomainNameValidator. Users should upgrade to these or later versions to remediate the vulnerability. Since Django's HttpResponse class already prevents newlines in headers, applications using standard Django response handling are not directly vulnerable. No additional mitigation is required beyond applying the official patch.
CVE-2026-53878: CWE-144: Improper Neutralization of Line Delimiters in djangoproject Django
Description
An issue was discovered in Django 6.0 before 6.0.7 and 5.2 before 5.2.16. `DomainNameValidator` does not prohibit newlines in domain names (unless used via a form field, since `CharField` strips newlines). If an application uses values with newlines in an HTTP response, header injection can occur. Django itself is unaffected because `HttpResponse` prohibits newlines in HTTP headers. Earlier, unsupported Django series (such as 5.0.x, 4.1.x, and 3.2.x) were not evaluated and may also be affected. Django would like to thank Bence Nagy for reporting this issue.
CVSS v3.1
Score 6.1medium
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 arises because the DomainNameValidator in Django versions 6.0 prior to 6.0.7 and 5.2 prior to 5.2.16 does not restrict newline characters in domain name inputs. If an application uses such domain names containing newlines in HTTP response headers, it could lead to HTTP header injection. However, Django's HttpResponse class inherently blocks newlines in headers, mitigating direct exploitation within Django itself. The vulnerability was reported by Bence Nagy. Unsupported older Django versions (5.0.x, 4.1.x, 3.2.x) were not assessed and might also be vulnerable. A fix has been released in the updated versions.
Potential Impact
The vulnerability could allow HTTP header injection if an application improperly uses domain names containing newline characters in HTTP response headers. This can lead to partial compromise of HTTP response integrity, potentially affecting confidentiality and integrity of HTTP communications. However, since Django's HttpResponse class prohibits newlines in headers, the framework itself is not directly exploitable. The impact is limited to applications that bypass or do not use Django's standard HTTP response handling.
Mitigation Recommendations
A patch is available in Django versions 6.0.7 and 5.2.16 that addresses this issue by properly prohibiting newlines in domain names validated by DomainNameValidator. Users should upgrade to these or later versions to remediate the vulnerability. Since Django's HttpResponse class already prevents newlines in headers, applications using standard Django response handling are not directly vulnerable. No additional mitigation is required beyond applying the official patch.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- DSF
- Date Reserved
- 2026-06-11T01:11:27.546Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a4d1440c9d9e3dbe35d5c83
Added to database: 07/07/2026, 14:59:12 UTC
Last enriched: 08/08/2026, 15:14:16 UTC
Last updated: 08/20/2026, 22:52:13 UTC
Views: 90
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.