DJANGO · CVE-2025-26699 · Package
FIX → 4.2.20 · 5.0.13 · 5.1.7
Django's django.utils.text.wrap() and the wordwrap template filter can consume excessive resources when given very long strings. An attacker who can get such input rendered can cause a denial of service.
first public Mar 6, 2025 · 1 source
Check it with your coding agent
It checks your repository and tells you if you’re affected, with the fix.
Applications built on Django 4.2 before 4.2.20, 5.0 before 5.0.13, or 5.1 before 5.1.7 that call wrap() or use the wordwrap filter on very long user-supplied strings. Sites that never pass untrusted text through these functions are much less exposed.
Not affected if fixed-version, no-user-input-wrapped
Who cares cwe-770, django, python, web-apps
python -m django --version.wordwrap filter or django.utils.text.wrap on user-supplied input.An issue was discovered in Django 5.1 before 5.1.7, 5.0 before 5.0.13, and 4.2 before 4.2.20. The django.utils.text.wrap() method and wordwrap template filter are subject to a potential denial-of-service attack when used with very long strings.
This page as .md · .json · CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:N/A:L
GitHub Advisory Database, CC-BY 4.0. Posts quoted belong to their authors.
Are you affected?
Tell InfraStack what you run. It checks this one, and every next one, against your stack.
Ask from here. InfraStack checks the affected versions against your stack and answers in your inbox.
InfraStack checks the affected versions against your stack and answers in Slack, with the evidence and the fix.
Upgrade to 4.2.20 · 5.0.13 · 5.1.7
4.2.20 on the 4.2 line.5.0.13 on the 5.0 line.5.1.7 on the 5.1 line.