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 products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| djangoproject | Django | 6.0 – < 6.0.7, 5.2 – < 5.2.16 | 6.0.7 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | python-django | 3:5.2.16-1 | — |
| Debian 13 | python-django | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | python-django | No fix yet | — |
| Ubuntu 26.04 LTS | python-django | No fix yet | — |
| Ubuntu 25.10 | python-django | No fix yet | — |
| Ubuntu 24.04 LTS | python-django | No fix yet | — |
| Ubuntu 22.04 LTS | python-django | No fix yet | — |
Show 4 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 20.04 LTS | python-django | No fix yet | — |
| Ubuntu Pro 18.04 LTS | python-django | No fix yet | — |
| Ubuntu Pro 16.04 LTS | python-django | No fix yet | — |
| Ubuntu Pro 14.04 LTS | python-django | No fix yet | — |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | python-Django +1 | 5.2.16-1.1 | openSUSE-SU-2026:11270-1, openSUSE-SU-2026:11248-1 |
| openSUSE Tumbleweed | python-Django6 | 6.0.7-1.1 | openSUSE-SU-2026:11236-1 |
| openSUSE Leap 16.0 | python-Django | 5.2.4-bp160.10.1 | openSUSE-SU-2026:21313-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | py3-django | 5.2.16-r0 | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | django | < 5.2.16 | 5.2.16 | GHSA-8qcx-xf44-272x |
| PyPI | django | >= 6.0.0, < 6.0.7 | 6.0.7 | GHSA-8qcx-xf44-272x |
| PyPI | django | >= 5.2, < 5.2.16 · >= 6.0, < 6.0.7 | 5.2.16, 6.0.7 | PYSEC-2026-2092 |
Advisories 5
- WID-SEC-2026-2231 Django: Mehrere Schwachstellen BSI CERT-Bund (WID) · Sep 30, 2026
- openSUSE-SU-2026:11270-1 python313-Django5-5.2.16-1.1 on GA media SUSE / openSUSE Security Updates · Jul 15, 2026
- openSUSE-SU-2026:21313-1 Security update for python-Django SUSE / openSUSE Security Updates · Jul 13, 2026
- openSUSE-SU-2026:11248-1 python313-Django-5.2.16-1.1 on GA media SUSE / openSUSE Security Updates · Jul 11, 2026
- openSUSE-SU-2026:11236-1 python313-Django6-6.0.7-1.1 on GA media SUSE / openSUSE Security Updates · Jul 10, 2026
References
- Django security archive vendor-advisory
- Django releases announcements mailing-list
- Django security releases issued: 6.0.7 and 5.2.16 vendor-advisory