Django Denial-of-service in django.utils.text.Truncator
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| django PyPI |
|
|
| Product | Affected | Fixed in |
|---|---|---|
| django PyPI |
|
|
2.2.4An issue was discovered in Django 1.11.x before 1.11.23, 2.1.x before 2.1.11, and 2.2.x before 2.2.4. If django.utils.text.Truncator's chars() and words() methods were passed the html=True argument, they were extremely slow to evaluate certain inputs due to a catastrophic backtracking vulnerability in a regular expression. The chars() and words() methods are used to implement the truncatechars_html and truncatewords_html template filters, which were thus vulnerable.
From the CVE record · mitre
Django’s HTML truncation filters use methods that can be extremely slow on certain inputs because of regex backtracking. An attacker who can supply input processed by these filters can cause excessive processing when the methods use html=True. The input does not specify whether network access, authentication, or user interaction is required.
Teams running the PyPI django package in the affected 1.11, 2.1, or 2.2 version ranges should check their installations.