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
The vulnerability arises because Django's DomainNameValidator allows newline characters in domain names unless the domain name is used via a form field, where CharField strips newlines. If an application uses domain names containing newlines in HTTP response headers, it could lead to HTTP header injection. However, Django's HttpResponse class prohibits newlines in HTTP headers, mitigating the risk within the framework itself. The affected versions include Django 6.0 prior to 6.0.7 and 5.2 prior to 5.2.16. Earlier unsupported versions such as 5.0.x, 4.1.x, and 3.2.x were not evaluated but may also be vulnerable. No official remediation level or patch links are provided in the data.
Potential Impact
The vulnerability could allow HTTP header injection if an application improperly uses domain names with newlines in HTTP responses. This could lead to partial compromise of HTTP response integrity, potentially affecting confidentiality and integrity of communications. The Django framework itself is not directly vulnerable due to internal protections in HttpResponse. There are no known exploits in the wild at this time.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Applications should avoid using untrusted domain name inputs containing newlines in HTTP headers. Since Django's HttpResponse class prohibits newlines in headers, using standard Django response handling mitigates the risk. Monitor official Django project advisories for updates and apply patches when available.
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
The vulnerability arises because Django's DomainNameValidator allows newline characters in domain names unless the domain name is used via a form field, where CharField strips newlines. If an application uses domain names containing newlines in HTTP response headers, it could lead to HTTP header injection. However, Django's HttpResponse class prohibits newlines in HTTP headers, mitigating the risk within the framework itself. The affected versions include Django 6.0 prior to 6.0.7 and 5.2 prior to 5.2.16. Earlier unsupported versions such as 5.0.x, 4.1.x, and 3.2.x were not evaluated but may also be vulnerable. No official remediation level or patch links are provided in the data.
Potential Impact
The vulnerability could allow HTTP header injection if an application improperly uses domain names with newlines in HTTP responses. This could lead to partial compromise of HTTP response integrity, potentially affecting confidentiality and integrity of communications. The Django framework itself is not directly vulnerable due to internal protections in HttpResponse. There are no known exploits in the wild at this time.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Applications should avoid using untrusted domain name inputs containing newlines in HTTP headers. Since Django's HttpResponse class prohibits newlines in headers, using standard Django response handling mitigates the risk. Monitor official Django project advisories for updates and apply patches when available.
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: 07/07/2026, 15:13:14 UTC
Last updated: 07/07/2026, 15:58:56 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.