CVE-2018-7537
Reported by mitre · Published March 9, 2018
Django is fixed in 2.0.3, 1.11.11 and 1.8.19 (PyPI)
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| Django | PyPI | 2.0.3, 1.11.11, 1.8.19 |
| py3-django | Alpine | 1.11.11-r0 |
| py-django | Alpine | 1.11.11-r0, 1.8.19-r0 |
| python-django | Ubuntu:16.04:LTS | 1.8.7-1ubuntu5.6 |
| django | djangoproject | 2.0.3, 1.11.11, 1.8.19 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| n/a | n/a | n/a |
| alpine | py3-django | 0 |
| alpine | py-django | 0, 0 |
| PyPI | django | |
| n/a | n/a | * |
| PyPI | Django | 2.0, 1.11, 1.8 |
| arch | python-django | 0 |
Timeline
- Mar 6, 2018 CVE Published
- Apr 14, 2021 EPSS Score (30 in total, the first dated here)
- Sep 8, 2025 CVE Updated
- Mar 6, 2026 Distribution Patch (4 in total, the first dated here)
- Mar 6, 2026 Security Advisory (6 in total, the first dated here)
- Sep 19, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2018-7537
vulnetix vdb fixes CVE-2018-7537
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2018-7537/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- USN-3591-1 vendor-advisoryx_refsource_UBUNTU
- [debian-lts-announce] 20180308 [SECURITY] [DLA 1303-1] python-django security update mailing-listx_refsource_MLIST
- x_refsource_CONFIRM
- RHSA-2018:2927 vendor-advisoryx_refsource_REDHAT
- 103357 vdb-entryx_refsource_BID
- RHSA-2019:0265 vendor-advisoryx_refsource_REDHAT
- DSA-4161 vendor-advisoryx_refsource_DEBIAN
- https://nvd.nist.gov/vuln/detail/CVE-2018-7537 advisory
- https://github.com/advisories/GHSA-2f9x-5v75-3qv4 advisory
- https://github.com/django/django/commit/94c5da1d17a6b0d378866c66b605102c19f7988c patch
- https://github.com/django/django/commit/a91436360b79a6ff995c3e5018bcc666dfaf1539 patch
- https://github.com/django/django/commit/d17974a287a6ea2e361daff88fcc004cbd6835fa patch
- https://github.com/django/django url
- https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2018-6.yaml advisory
- https://usn.ubuntu.com/3591-1 url
- https://www.djangoproject.com/weblog/2018/mar/06/security-releases url