Mako is vulnerable to regular expression denial of service. The vulnerability exists due to the insecure regex pattern used for the match
attribute in the match_tag_start
function of lexer.py
, allowing an attacker to crash the application by providing a large number of tag quotes within its quoted sections.
github.com/sqlalchemy/mako/blob/c2f392e0be52dc67d1b9770ab8cce6a9c736d547/mako/ext/extract.py#L21
github.com/sqlalchemy/mako/commit/925760291d6efec64fda6e9dd1fd9cfbd5be068c
github.com/sqlalchemy/mako/issues/366
lists.debian.org/debian-lts-announce/2022/09/msg00026.html
pyup.io/posts/pyup-discovers-redos-vulnerabilities-in-top-python-packages/
pyup.io/vulnerabilities/CVE-2022-40023/50870/