Django security releases issued: 5.1.7, 5.0.13 and 4.2.20
In accordance with our security release policy, the Django team is issuing releases for Django 5.1.7, Django 5.0.13 and Django 4.2.20. These releases address the security issues detailed below. We encourage all users of Django to upgrade as soon as possible.
CVE-2025-26699: Potential denial-of-service in django.utils.text.wrap()
The django.utils.text.wrap() and wordwrap template filter were subject to a potential denial-of-service attack when used with very long strings.
Thanks to sw0rd1ight for the report.
This issue has severity "moderate" according to the Django security policy.
Affected supported versions
- Django main
- Django 5.2 (currently at pre-release beta status)
- Django 5.1
- Django 5.0
- Django 4.2
Resolution
Patches to resolve the issue have been applied to Django's main, 5.2, 5.1, 5.0, and 4.2 branches. The patches may be obtained from the following changesets.
CVE-2025-26699: Potential denial-of-service in django.utils.text.wrap()
- On the main branch
- On the 5.2 branch
- On the 5.1 branch
- On the 5.0 branch
- On the 4.2 branch
The following releases have been issued
- Django 5.1.7 (download Django 5.1.7 | 5.1.7 checksums)
- Django 5.0.13 (download Django 5.0.13 | 5.0.13 checksums)
- Django 4.2.20 (download Django 4.2.20 | 4.2.20 checksums)
The PGP key ID used for this release is Sarah Boyce: 3955B19851EA96EF
General notes regarding security reporting
As always, we ask that potential security issues be reported via private email to security@djangoproject.com, and not via Django's Trac instance, nor via the Django Forum. Please see our security policies for further information.