# CVE-2022-40023: mako is vulnerable to Regular Expression Denial of Service

Source: https://junglewise.ai/threats/cve-2022-40023-mako-is-vulnerable-to-regular-expression-denial-of-service  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2022-09-07  
License: CC BY 4.0 with a link back

CVE-2022-40023 · Severity: low · CVSS 3.1 · Published 2022-09-07

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.

Technologies: [Mako (PyPI)](https://junglewise.ai/threats/technologies/mako). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2022-40023 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2022-40023 being exploited in the wild.

**How severe is CVE-2022-40023?** Low severity, with a CVSS score of 3.1, published 7 September 2022.

**Which products and versions are affected?** Mako (PyPI) ECOSYSTEM:introduced=0,fixed=1.2.2, GIT:introduced=0,fixed=925760291d6efec64fda6e9dd1fd9cfbd5be068c|ECOSYSTEM:introduced=0,fixed=1.2.2.

**Is there a fix for CVE-2022-40023?** Yes. Mako (PyPI): upgrade to 1.2.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2022-40023?** Check whether you run Mako (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- Mako (PyPI): upgrade to 1.2.2 or later

  ```sh
  pip install "Mako>=1.2.2"
  ```


## Affected products

- Mako (PyPI) ECOSYSTEM:introduced=0,fixed=1.2.2, GIT:introduced=0,fixed=925760291d6efec64fda6e9dd1fd9cfbd5be068c|ECOSYSTEM:introduced=0,fixed=1.2.2

## Identifiers

- CVE-2022-40023
- GHSA-v973-fxgf-6xhp
- PYSEC-2022-260

## Related threats

- [Mako template library path traversal via drive designator on Windows](https://junglewise.ai/threats/cve-2026-102991-mako-is-a-template-library-written-in-python-prior-to-1-4-2-on)
- [SQLAlchemy Mako path traversal on Windows via backslash URIs](https://junglewise.ai/threats/cve-2026-44307-mako-path-traversal-via-backslash-uri-on-windows-in)
- [SQLAlchemy Mako path traversal in TemplateLookup](https://junglewise.ai/threats/cve-2026-41205-sqlalchemy-mako-path-traversal-in-templatelookup)
- [Mako contains Cross-site Scripting vulnerability](https://junglewise.ai/threats/cve-2010-2480-mako-contains-cross-site-scripting-vulnerability)
