CVE-2018-7537 Django Denial-of-service possibility in truncatechars_html and truncatewords_html template filters
Attackers can cause denial of service in Django applications using specific HTML truncation filters due to catastrophic regex backtracking.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2018-7537?
CVE-2018-7537 is a medium-severity denial of service vulnerability in Canonical Ubuntu Linux, published on 9 Mar 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
An issue was discovered in Django 2.0 before 2.0.3, 1.11 before 1.11.11, and 1.8 before 1.8.19. 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.
Weakness: CWE-185
Which versions are affected by CVE-2018-7537?
7 open source packages ship an affected version, including django and Django. It affects 3 products.
| Package | Affected | Fixed in |
|---|---|---|
django PyPI | From 1.11 | 1.11.11 |
django PyPI | From 1.8 | 1.8.19, 1.11.11, 2.0.3 |
django PyPI | From 1.8 | 1.8.19 |
django PyPI | From 2.0 | 2.0.3 |
Django PyPI | From 1.11 | 1.11.11 |
Django PyPI | From 1.8 | 1.8.19 |
1 more packages
Django PyPI | From 2.0 | 2.0.3 |
Products include Canonical Ubuntu Linux, Debian Debian Linux, Djangoproject Django.
How do I fix CVE-2018-7537?
Upgrade django to a fixed version for your release line: 1.11.11, 1.8.19 or 2.0.3.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2018-7537 being exploited?
There is no known exploitation of CVE-2018-7537 in the wild and no public exploit code.
Other vulnerabilities in Canonical Ubuntu Linux
Sources
Also known as ALPINE-CVE-2018-7537, DEBIAN-CVE-2018-7537, GHSA-2f9x-5v75-3qv4, PYSEC-2018-6, UBUNTU-CVE-2018-7537.