CVE-2022-40023
mako is vulnerable to Regular Expression Denial of Service
Reported by mitre · Published September 7, 2022
Mako is fixed in 925760291d6efec64fda6e9dd1fd9cfbd5be068c and 1.2.2 (PyPI)
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| Mako | PyPI | 925760291d6efec64fda6e9dd1fd9cfbd5be068c, 1.2.2 |
| python-mako-doc | Amazon Linux | 1.1.4-3.amzn2023.0.3 |
| python3-mako | Amazon Linux | 1.1.4-3.amzn2023.0.3 |
| mako | sqlalchemy | 1.2.2 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| n/a | n/a | n/a |
| amazon:2023 | python-mako-doc | 0 |
| amazon:2023 | python3-mako | 0 |
| n/a | n/a | * |
| amazon:2 | python-mako | 0 |
| PyPI | Mako | 0 |
| alpine | py3-mako | 0 |
Timeline
- Sep 7, 2022 CVE Published
- Sep 8, 2022 EPSS Score (30 in total, the first dated here)
- Mar 9, 2026 Security Advisory (87 in total, the first dated here)
- Mar 21, 2026 Distribution Patch (82 in total, the first dated here)
- Jun 17, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2022-40023
vulnetix vdb fixes CVE-2022-40023
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2022-40023/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- [debian-lts-announce] 20220921 [SECURITY] [DLA 3116-1] mako security update mailing-list
- https://nvd.nist.gov/vuln/detail/CVE-2022-40023 advisory
- https://github.com/advisories/GHSA-v973-fxgf-6xhp advisory
- https://github.com/pypa/advisory-database/tree/main/vulns/mako/PYSEC-2022-260.yaml advisory
- https://github.com/sqlalchemy/mako url
- https://pyup.io/posts/pyup-discovers-redos-vulnerabilities-in-top-python-packages url
- https://pyup.io/vulnerabilities/CVE-2022-40023/50870 url
- https://lists.debian.org/debian-lts-announce/2025/12/msg00004.html url