1.11.23.txt 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. ============================
  2. Django 1.11.23 release notes
  3. ============================
  4. *August 1, 2019*
  5. Django 1.11.23 fixes security issues in 1.11.22.
  6. CVE-2019-14232: Denial-of-service possibility in ``django.utils.text.Truncator``
  7. ================================================================================
  8. If ``django.utils.text.Truncator``'s ``chars()`` and ``words()`` methods
  9. were passed the ``html=True`` argument, they were extremely slow to evaluate
  10. certain inputs due to a catastrophic backtracking vulnerability in a regular
  11. expression. The ``chars()`` and ``words()`` methods are used to implement the
  12. :tfilter:`truncatechars_html` and :tfilter:`truncatewords_html` template
  13. filters, which were thus vulnerable.
  14. The regular expressions used by ``Truncator`` have been simplified in order to
  15. avoid potential backtracking issues. As a consequence, trailing punctuation may
  16. now at times be included in the truncated output.
  17. CVE-2019-14233: Denial-of-service possibility in ``strip_tags()``
  18. =================================================================
  19. Due to the behavior of the underlying ``HTMLParser``,
  20. :func:`django.utils.html.strip_tags` would be extremely slow to evaluate
  21. certain inputs containing large sequences of nested incomplete HTML entities.
  22. The ``strip_tags()`` method is used to implement the corresponding
  23. :tfilter:`striptags` template filter, which was thus also vulnerable.
  24. ``strip_tags()`` now avoids recursive calls to ``HTMLParser`` when progress
  25. removing tags, but necessarily incomplete HTML entities, stops being made.
  26. Remember that absolutely NO guarantee is provided about the results of
  27. ``strip_tags()`` being HTML safe. So NEVER mark safe the result of a
  28. ``strip_tags()`` call without escaping it first, for example with
  29. :func:`django.utils.html.escape`.
  30. CVE-2019-14234: SQL injection possibility in key and index lookups for ``JSONField``/``HStoreField``
  31. ====================================================================================================
  32. :lookup:`Key and index lookups <jsonfield.key>` for
  33. ``django.contrib.postgres.fields.JSONField`` and :lookup:`key lookups
  34. <hstorefield.key>` for :class:`~django.contrib.postgres.fields.HStoreField`
  35. were subject to SQL injection, using a suitably crafted dictionary, with
  36. dictionary expansion, as the ``**kwargs`` passed to ``QuerySet.filter()``.
  37. CVE-2019-14235: Potential memory exhaustion in ``django.utils.encoding.uri_to_iri()``
  38. =====================================================================================
  39. If passed certain inputs, :func:`django.utils.encoding.uri_to_iri` could lead
  40. to significant memory usage due to excessive recursion when re-percent-encoding
  41. invalid UTF-8 octet sequences.
  42. ``uri_to_iri()`` now avoids recursion when re-percent-encoding invalid UTF-8
  43. octet sequences.