summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorNatalia <124304+nessita@users.noreply.github.com>2026-01-21 09:53:10 -0300
committerJacob Walls <jacobtylerwalls@gmail.com>2026-02-03 07:54:16 -0500
commita33540b3e20b5d759aa8b2e4b9ca0e8edd285344 (patch)
treeb202b53b2c56d221ea0ec1b50dd1dec348208dd5 /docs/ref
parent81aa5292967cd09319c45fe2c1a525ce7b6684d8 (diff)
Fixed CVE-2026-1285 -- Mitigated potential DoS in django.utils.text.Truncator for HTML input.
The `TruncateHTMLParser` used `deque.remove()` to remove tags from the stack when processing end tags. With crafted input containing many unmatched end tags, this caused repeated full scans of the tag stack, leading to quadratic time complexity. The fix uses LIFO semantics, only removing a tag from the stack when it matches the most recently opened tag. This avoids linear scans for unmatched end tags and reduces complexity to linear time. Refs #30686 and 6ee37ada3241ed263d8d1c2901b030d964cbd161. Thanks Seokchan Yoon for the report, and Jake Howard and Jacob Walls for reviews.
Diffstat (limited to 'docs/ref')
0 files changed, 0 insertions, 0 deletions