{"id":"GHSA-v973-fxgf-6xhp","summary":"mako is vulnerable to Regular Expression Denial of Service","details":"Sqlalchemy 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.","aliases":["CVE-2022-40023","PYSEC-2022-260"],"modified":"2026-03-11T07:49:05.880245Z","published":"2022-09-16T17:20:25Z","database_specific":{"severity":"HIGH","github_reviewed":true,"github_reviewed_at":"2022-09-16T17:20:25Z","nvd_published_at":"2022-09-07T13:15:00Z","cwe_ids":["CWE-1333"]},"references":[{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-40023"},{"type":"WEB","url":"https://github.com/sqlalchemy/mako/issues/366"},{"type":"WEB","url":"https://github.com/sqlalchemy/mako/commit/925760291d6efec64fda6e9dd1fd9cfbd5be068c"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-v973-fxgf-6xhp"},{"type":"WEB","url":"https://github.com/pypa/advisory-database/tree/main/vulns/mako/PYSEC-2022-260.yaml"},{"type":"WEB","url":"https://github.com/sqlalchemy/mako"},{"type":"WEB","url":"https://github.com/sqlalchemy/mako/blob/c2f392e0be52dc67d1b9770ab8cce6a9c736d547/mako/ext/extract.py#L21"},{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2022/09/msg00026.html"},{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2025/12/msg00004.html"},{"type":"WEB","url":"https://pyup.io/posts/pyup-discovers-redos-vulnerabilities-in-top-python-packages"},{"type":"WEB","url":"https://pyup.io/vulnerabilities/CVE-2022-40023/50870"}],"affected":[{"package":{"name":"mako","ecosystem":"PyPI","purl":"pkg:pypi/mako"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.2"}]}],"versions":["0.1.0","0.1.1","0.1.10","0.1.2","0.1.3","0.1.4","0.1.5","0.1.6","0.1.7","0.1.8","0.1.9","0.2.0","0.2.1","0.2.2","0.2.3","0.2.4","0.2.5","0.3.0","0.3.1","0.3.2","0.3.3","0.3.4","0.3.5","0.3.6","0.4.0","0.4.1","0.4.2","0.5.0","0.6.0","0.6.1","0.6.2","0.7.0","0.7.1","0.7.2","0.7.3","0.8.0","0.8.1","0.9.0","0.9.1","1.0.0","1.0.1","1.0.10","1.0.11","1.0.12","1.0.13","1.0.14","1.0.2","1.0.3","1.0.4","1.0.5","1.0.6","1.0.7","1.0.8","1.0.9","1.1.0","1.1.1","1.1.2","1.1.3","1.1.4","1.1.5","1.1.6","1.2.0","1.2.1"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/09/GHSA-v973-fxgf-6xhp/GHSA-v973-fxgf-6xhp.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"},{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"}]}