PyPI: mako

CVE-2022-40023

Safety vulnerability ID: SFTY-20220907-56872

Safety legacy ID: pyup.io-50870

Mako before 1.2.2 is vulnerable to Regular expression Denial of Service when using the Lexer class to parse. This also affects babelplugin and linguaplugin. https://pyup.io/posts/pyup-discovers-redos-vulnerabilities-in-top-python-packages

Created at: Jul 5, 2026Updated at: Jul 5, 2026

Overview

mako is vulnerable to Regular Expression Denial of Service

Advisory

Mako before 1.2.2 is vulnerable to Regular expression Denial of Service when using the Lexer class to parse. This also affects babelplugin and linguaplugin. https://pyup.io/posts/pyup-discovers-redos-vulnerabilities-in-top-python-packages

Affected Package

Affecting mako package, versions<1.2.2

Also affects

---

How to Fix

Upgrademakoto1.2.2or higher.

Mitigation and Workarounds

---

Vulnerable Functions

Functions linked to known vulnerabilities.

Vulnerable function data is available for Enterprise customers

Book a call with us to see Safety in action.

Safety

Verified by Safety

Our Cybersecurity Intelligence Team reviewed this vulnerability. We combine public data with our own research to find issues not yet reported to public sources.

Learn more