Header injection possibility since DomainNameValidator accepted newlines in input (djangoproject Django)
At a glance
- Source
- NVD
- EPSS
- EPSS 0.33 % · percentile 26 ()
- State
- PUBLISHED
- Published
- Updated
- Assigner
- DSF
- NVD status
- Analyzed
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.
Weaknesses (CWE)
- CWE-144 — Improper Neutralization of Line Delimiters
References
Scores
| Version | Score | Vector | Scored by |
|---|---|---|---|
| CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N | DSF |
| CVSS 4.0 | MEDIUM 5.3 | 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 | DSF |
| CVSS 4.0 | MEDIUM 5.3 | 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X | NVD · 6a34fbeb-21d4-45e7-8e0a-62b95bc12c92 (Secondary) |
| CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N | NVD · 6a34fbeb-21d4-45e7-8e0a-62b95bc12c92 (Secondary) |
Advisories
- GHSA-8qcx-xf44-272x — Django: DomainNameValidator permits newline characters that may enable HTTP header injection
- PYSEC-2026-2092 — An issue was discovered in Django 6.0 before 6.0.7 and 5.2 before 5.2.16.
European references
- ENISA EUVD · EUVD-2026-42045
- GCVE · GCVE-0-2026-53878
Affected configurations (NVD CPE)
cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*≥ 5.2 < 5.2.16cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*≥ 6.0 < 6.0.7
Affected products
| Product | Versions |
|---|---|
| djangoproject · Django | affected 6.0 < 6.0.7 ; unaffected 6.0.7 ; affected 5.2 < 5.2.16 ; unaffected 5.2.16 |
Sources
| Source | Licence |
|---|---|
| CVE List (CVEProject cvelistV5) | CVE Program Terms of Use |
| EPSS (FIRST.org) | FIRST — attribution requested |
| ENISA EUVD | ENISA — reproduction authorised, source acknowledged |
| NVD (NIST) via fkie-cad/nvd-json-data-feeds | Public domain — this product uses data from the NVD API but is not endorsed or certified by the NVD |