Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAttacker submits domain name with embedded CRLF
-
DeliveryDomainNameValidator accepts input without stripping newlines
-
ExploitApplication writes value into raw WSGI/ASGI response header outside HttpResponse
-
ExecutionInjected header included in HTTP response to victim
-
PersistVictim browser processes forged header (Set-Cookie, Location, etc.)
-
ImpactSession fixation or open redirect achieved
Vulnerability Assessment
| Weakness |
CWE
|
| Exploitation Conditions | Two simultaneous application-level conditions are required: (1) the application invokes DomainNameValidator (or a model field that uses it) directly on user-controlled input without routing through a Django form backed by CharField, since CharField.clean() strips newlines before validation occurs; AND (2) the validator-accepted domain string is inserted into an HTTP response header via a raw WSGI/ASGI response mechanism that bypasses Django's own HttpResponse API, which independently rejects newline characters in header values. Standard Django form-processing flows and HttpResponse-based header assignment are each independently protected against this attack. Exploitation is further limited by the UI:R requirement: a victim user must receive and process the crafted HTTP response for header injection to produce practical impact (e.g., a browser honoring an injected Set-Cookie or Location header). Unauthenticated remote attackers can trigger the injection, but achieving meaningful impact requires influencing a response delivered to a victim's browser session. |
| Impact | The NVD-assigned CVSS 3.1 score of 6.1 (Medium) with vector AV:N/AC:L/PR:N/UI:R/S:C reflects a realistic worst case where a network attacker with no privileges manipulates a header that affects a victim's browser session. However, this score overstates real-world risk for typical Django deployments: because HttpResponse (the standard header-assignment mechanism) independently prohibits newline injection, exploitation requires the uncommon pattern of using DomainNameValidator output directly in raw response header construction outside of HttpResponse. This is a non-default application architecture. No KEV listing and no public exploit code exist at time of analysis; EPSS data was not included in the source intelligence, so exploitation probability from that signal is unknown. The vulnerability is best classified as a defense-in-depth failure at the validator layer rather than a broadly exploitable flaw. Applications that directly pipe DomainNameValidator-validated values into custom WSGI/ASGI header logic should treat this as a high priority; mainstream Django applications using standard form and response APIs face minimal practical risk. |
| Exploit ScenarioDerived | An attacker submits a crafted domain value containing an embedded CRLF sequence (e.g., legitimate.com\r\nSet-Cookie: session=attacker) to a Django application that validates it with DomainNameValidator and then writes the result into an HTTP response header via a raw WSGI/ASGI response path rather than through HttpResponse. The server delivers the response to a victim user whose browser parses the injected header - honoring the forged Set-Cookie, Location redirect, or similar directive - enabling session fixation or open redirect exploitation. No public proof-of-concept has been identified, though HTTP response splitting is a well-documented, low-complexity technique once a vulnerable code path is identified. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 07, 2026
Header injection in Django's DomainNameValidator allows network attackers to inject arbitrary HTTP response headers when applications pass validator-accepted domain values directly into HTTP responses, affecting Django 6.0 before 6.0.7 and 5.2 before 5.2.16. The validator silently accepts embedded newline characters in domain name strings, enabling HTTP response splitting that can facilitate session hijacking, open redirects, or cross-site scripting against end users. No public exploit code or CISA KEV listing exists at time of analysis; practical risk is narrowed significantly by Django's HttpResponse class independently rejecting newlines, meaning only non-standard code paths are exploitable.
RemediationAI
Upgrade to Django 6.0.7 or Django 5.2.16, released by the Django Software Foundation on 2026-07-07 and documented at https://www.djangoproject.com/weblog/2026/jul/07/security-releases/. For deployments that cannot patch immediately, audit all code paths where DomainNameValidator (or model fields that invoke it) is called directly on user-supplied input and the result is subsequently written to an HTTP response header outside of Django's HttpResponse or HttpResponseBase APIs - these are the only exploitable patterns. A targeted compensating control is to add explicit newline stripping before any user-influenced string is placed in a header value (e.g., value.replace('\r', '').replace('\n', '')); note this addresses the symptom rather than the root cause and should not substitute for patching. Avoid relying on unsupported Django series (5.0.x and earlier) in production environments, as those branches have not been assessed and carry no committed patch path.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The root cause is CWE-144 (Improper Neutralization of Line Delimiters): Django's DomainNameValidator fails to reject or strip CRLF (\r\n) and LF (\n) characters from domain name inputs. In HTTP/1.1, headers are delimited by CRLF sequences, so injecting newlines into a header value allows an attacker to terminate the current header and append entirely new ones - a technique known as HTTP response splitting. The affected CPE cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:* spans all Django versions in the 5.2 and 6.0 series. Two independent safeguards exist in the standard stack that limit exposure: Django's CharField.clean() strips newlines before passing values to the validator (protecting form-based flows), and Django's HttpResponse API independently rejects newlines when setting headers. The vulnerability surfaces only when DomainNameValidator is invoked outside of a form field AND its output is written to a response header through a raw WSGI/ASGI path that bypasses HttpResponse's own sanitization guard.
Know when Django gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
AC:H reflects the non-default application pattern required - direct DomainNameValidator use bypassing both CharField and HttpResponse protections; remaining metrics mirror standard header injection impact.
AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Primary rating from Vendor (DSF).
CVSS VectorVendor: DSF
Lifecycle Timeline
2DescriptionCVE.org
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.
Blast Radius
ecosystem impact- 12 pypi packages depend on django (12 direct, 0 indirect)
Ecosystem-wide dependent count for version 5.2.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
The package python/cpython from 0 and before 3.6.13, from 3.7.0 and before 3.7.10, from 3.8.0 and before 3.8.8, from 3.9
In Django 1.10.x before 1.10.8 and 1.11.x before 1.11.5, HTML autoescaping was disabled in a portion of the template for
An issue was discovered in Django 3.2 before 3.2.14 and 4.0 before 4.0.6. Rated critical severity (CVSS 9.8), this vulne
Django 3.1.x before 3.1.13 and 3.2.x before 3.2.5 allows QuerySet.order_by SQL injection if order_by is untrusted input
Django before 1.11.27, 2.x before 2.2.9, and 3.x before 3.0.1 allows account takeover. Rated critical severity (CVSS 9.8
An authentication/authorization bypass in the djust Python live-view framework (versions prior to 1.0.7) lets unauthenti
Unauthenticated arbitrary Python module import in djust before 1.0.7 lets any client that can reach the WebSocket or SSE
Django 1.11 before 1.11.29, 2.2 before 2.2.11, and 3.0 before 3.0.4 allows SQL Injection if untrusted data is used as a
Cross-site scripting (XSS) vulnerability in the dismissChangeRelatedObjectPopup function in contrib/admin/static/admin/j
Forged content modification in django-page-cms through 2.0.13 lets unauthenticated remote attackers exploit five CSRF-ex
Cross-site request forgery in djust's Server-Sent-Events transport affects all versions prior to 1.0.7 and allows a cros
Unauthenticated remote attackers can read live Django view and session state and invoke server-side handlers through dju
Same weakness CWE-144 – Improper Neutralization of Line Delimiters
View allSame technique Code Injection
View allVendor StatusVendor
SUSE
Severity: Moderate| Product | Status |
|---|---|
| openSUSE Leap 16.0 | Fixed |
| openSUSE Tumbleweed | Fixed |
| SUSE Linux Enterprise Module for Package Hub 15 SP7 | Not-Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP6 | Not-Affected |
| openSUSE Leap 15.6 | Not-Affected |
EUVD-2026-42045
GHSA-8qcx-xf44-272x
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB