mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed CVE-2018-7537 -- Fixed catastrophic backtracking in django.utils.text.Truncator.
Thanks James Davis for suggesting the fix.
This commit is contained in:
@@ -16,3 +16,15 @@ expression. The ``urlize()`` function is used to implement the ``urlize`` and
|
||||
|
||||
The problematic regular expression is replaced with parsing logic that behaves
|
||||
similarly.
|
||||
|
||||
CVE-2018-7537: Denial-of-service possibility in ``truncatechars_html`` and ``truncatewords_html`` template filters
|
||||
==================================================================================================================
|
||||
|
||||
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.
|
||||
|
||||
The backtracking problem in the regular expression is fixed.
|
||||
|
||||
Reference in New Issue
Block a user