CVE-2026-53878

NameCVE-2026-53878
DescriptionAn 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.
SourceCVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)
Debian Bugs1141629

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
python-django (PTS)bullseye2:2.2.28-1~deb11u2fixed
bullseye (security)2:2.2.28-1~deb11u12fixed
bookworm3:3.2.25-0+deb12u3fixed
bookworm (security)3:3.2.25-0+deb12u2fixed
trixie3:4.2.28-0+deb13u2vulnerable
trixie (security)3:4.2.28-0+deb13u1vulnerable
forky, sid3:5.2.16-1fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
python-djangosourcebullseye(not affected)
python-djangosourcebookworm(not affected)
python-djangosource(unstable)3:5.2.16-11141629

Notes

[trixie] - python-django <no-dsa> (Minor issue)
[bookworm] - python-django <not-affected> (DomainNameValidator introduced in Django 5.1)
[bullseye] - python-django <not-affected> (DomainNameValidator introduced in Django 5.1)
https://www.djangoproject.com/weblog/2026/jul/07/security-releases/
Fixed by: https://github.com/django/django/commit/d5d60ed0323cddaa0ce0237a26a3d49ac21ee05e (5.2.16)

Search for package or bug name: Reporting problems