Mistune — парсер Python Markdown с рендерами и плагинами. До 3.3.4 parse_link_href выполняет неограниченное сканирование балансировки скобок до конца документа для каждой непревзойденной открывающей скобки, достигаемой через пустую метку ссылки. В src/mistune/helpers.py и src/mistune/inline_parser.py пустая метка обходит no_close_bracket_before, а no_link_before продвигается только мимо короткой метки, поэтому последовательно [] (кандидаты неоднократно сканируют оставшийся документ.
Отображение ненадежного Markdown с рендерером HTML по умолчанию и без плагинов может выполнять квадратичную работу CPU и поддерживать 100-процентное использование рабочего. Эта проблема исправлена в версии 3.3.4.
Показать оригинальное описание (EN)
Mistune is a Python Markdown parser with renderers and plugins. Prior to 3.3.4, parse_link_href performs an unbounded parenthesis-balancing scan to the end of the document for each unmatched opening parenthesis reached through an empty [] link label. In src/mistune/helpers.py and src/mistune/inline_parser.py, the empty label bypasses no_close_bracket_before, and no_link_before advances only past the short label, so successive [] ( candidates repeatedly scan the remaining document. Rendering untrusted Markdown with the default HTML renderer and no plugins can perform quadratic CPU work and keep a worker at 100 percent utilization. This issue is fixed in version 3.3.4.
Характеристики атаки
Последствия
Строка CVSS v3.1