CVE-2026-53878
JSON

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 packageVersionsReported by
djangofrom 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.7GitHub Advisory Database, PyPA Advisory Database
djangoproject djangofrom 5.2 before 5.2.16, from 6.0 before 6.0.7NVD
django (Bitnami)from 5.2.0 before 5.2.16, from 6.0.0 before 6.0.7Bitnami Vulnerability Database

All scores

DSF6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
DSF5.3medium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
GitHub6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
GitHubmedium CVSS:4.0CVSS: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 DatabaseNot scored CVSS:4.0CVSS: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 Databasemedium rating

Classification

CWE-144

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

https://docs.djangoproject.com/en/dev/releases/security/advisory, fix, patch, vendor-advisory
https://groups.google.com/g/django-announceadvisory, article, mailing-list, release-notes, web
https://www.djangoproject.com/weblog/2026/jul/07/security-releases/advisory, fix, patch, vendor-advisory
https://nvd.nist.gov/vuln/detail/CVE-2026-53878advisory, web
https://github.com/django/django/commit/3a720d0d8bf2529253b98968f10ca73daf6d693cweb
https://github.com/django/django/commit/a5de13f1491f1dbf2bb0ad9b91570524ebbc8acdweb
https://github.com/django/django/commit/d5d60ed0323cddaa0ce0237a26a3d49ac21ee05eweb
https://docs.djangoproject.com/en/dev/releases/securityweb
https://github.com/django/djangopackage
https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2026-2092.yamlweb
https://www.djangoproject.com/weblog/2026/jul/07/security-releasesweb
https://github.com/advisories/GHSA-8qcx-xf44-272xadvisory

Sources

SourceRecordLicence
CVE ListCVE-2026-53878 changed 2026-07-07CVE Terms of Use
GitHub Advisory DatabaseGHSA-8qcx-xf44-272x changed 2026-09-10CC-BY-4.0
NVDCVE-2026-53878 changed 2026-10-25Public domain
PyPA Advisory DatabasePYSEC-2026-2092 changed 2026-08-10CC-BY-4.0
Bitnami Vulnerability DatabaseBIT-DJANGO-2026-53878 changed 2026-09-08Apache-2.0