5.3medium
Header injection possibility since DomainNameValidator accepted newlines in input
- Severity
- 5.3medium CVSS:4.0 by DSF
- Exploit likelihood
- 0.21% (higher than 11% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- DSF
- Also known as
- GHSA-8qcx-xf44-272xBIT-DJANGO-2026-53878PYSEC-2026-2092
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| django | from 6.0 before 6.0.7, from 5.2 before 5.2.16 Not affected: 6.0.7, 5.2.16 | CVE List |
| django (PyPI) | before 5.2.16, from 6.0.0 before 6.0.7, from 5.2 before 5.2.16, from 6.0 before 6.0.7 | GitHub Advisory Database, PyPA Advisory Database |
| djangoproject django | from 5.2 before 5.2.16, from 6.0 before 6.0.7 | NVD |
| django (Bitnami) | from 5.2.0 before 5.2.16, from 6.0.0 before 6.0.7 | Bitnami Vulnerability Database |
All scores
| DSF | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| DSF | 5.3medium CVSS:4.0 | 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 |
| GitHub | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| GitHub | medium CVSS:4.0 | 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 |
| PyPA Advisory Database | Not scored CVSS:4.0 | 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 |
| Bitnami Vulnerability Database | medium rating |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
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.
NVD (es)
Se descubrió un problema en Django 6.0 anterior a 6.0.7 y 5.2 anterior a 5.2.16. ’DomainNameValidator’ no prohíbe los saltos de línea en los nombres de dominio (a menos que se use a través de un campo de formulario, ya que ’CharField’ elimina los saltos de línea). Si una aplicación utiliza valores con saltos de línea en una respuesta HTTP, puede ocurrir una inyección de encabezado. Django en sí no se ve afectado porque ’HttpResponse’ prohíbe los saltos de línea en los encabezados HTTP. Series de Django anteriores y no compatibles (como 5.0.x, 4.1.x y 3.2.x) no fueron evaluadas y también pueden verse afectadas. Django desea agradecer a Bence Nagy por informar sobre este problema.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-53878 changed 2026-07-07 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-8qcx-xf44-272x changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2026-53878 changed 2026-10-25 | Public domain |
| PyPA Advisory Database | PYSEC-2026-2092 changed 2026-08-10 | CC-BY-4.0 |
| Bitnami Vulnerability Database | BIT-DJANGO-2026-53878 changed 2026-09-08 | Apache-2.0 |