CVE-2022-40023
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.
02 Description
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.
03 Exploitation and scoring
- Exploitation
- Not assessed. CISA has not published an exploitation assessment for this record, and it is not in the KEV catalog. That is an absence of assessment, not a finding of no risk.
- SSVC decision
- Not assessed by CISA
- EPSS probability
- 2.17% probability of exploitation activity in the next 30 days.
- EPSS percentile
- Equal to or higher than the score of 81.9% of scored records. A rank, not a probability.
- NVD base score
- 7.5 (CVSS v3.x), scored by the NVD independently of the CNA.
- NVD CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- NVD analysis status
- Modified. NVD last modified this record on 2026-06-17.
- Red Hat severity
- Moderate. Red Hat's rating for its own products, not a CVSS rating.
Exploit-prediction scores from FIRST. Independent scoring and analysis status from the NVD. Vendor severity from Red Hat. Exploitation assessment and catalog membership from CISA.
04 Metadata
- Published
- 2022-09-07 00:00Z4 YR AGO
- Last updated
- 2025-12-03 06:05Z11 MO AGO
- Reserved
- 2022-09-06
- Assigning CNA
- mitre
- Record state
- PUBLISHED
- Severity
- Not rated by the issuing CNA
- CNA CVSS vector
- Not published by the issuing CNA
- Weaknesses
- CWE-1333Inefficient Regular Expression ComplexityBase
- Data version
- 5.2
- Document digest
- 12be863e7989565f1abbc2f72d316a04cb16ef06e5b5eeb11bea1e03bee9bbad
05 Affected products
06 References
- github.comhttps://github.com/sqlalchemy/mako/issues/366
- github.comhttps://github.com/sqlalchemy/mako/commit/925760291d6efec64fda6e9dd1fd9cfbd5be068c
- github.comhttps://github.com/sqlalchemy/mako/blob/c2f392e0be52dc67d1b9770ab8cce6a9c736d547/mako/ext/extract.py#L21
- pyup.iohttps://pyup.io/vulnerabilities/CVE-2022-40023/50870/
- lists.debian.org[debian-lts-announce] 20220921 [SECURITY] [DLA 3116-1] mako security updatehttps://lists.debian.org/debian-lts-announce/2022/09/msg00026.html
- pyup.iohttps://pyup.io/posts/pyup-discovers-redos-vulnerabilities-in-top-python-packages/
- lists.debian.orghttps://lists.debian.org/debian-lts-announce/2025/12/msg00004.html
07 Fixed in
AlmaLinux 8
- python3-mako Fixed in 1.0.6-14.el8
Source: AlmaLinux, AlmaLinux OS. Copyright (c) 2023 AlmaLinux OS. Licensed under MIT License. Received through OSV.dev. Reformatted by exploit.cc.
AlmaLinux 9
- python3-mako Fixed in 1.1.4-6.el9
Source: AlmaLinux, AlmaLinux OS. Copyright (c) 2023 AlmaLinux OS. Licensed under MIT License. Received through OSV.dev. Reformatted by exploit.cc.
CloudLinux 8
- python3-mako Fixed in 1.0.6-14.el8
Derived from AlmaLinux 8. Partial coverage: only packages taken from AlmaLinux 8 are listed.
Source: CloudLinux errata, CloudLinux Inc. Derived from: AlmaLinux, AlmaLinux OS. Copyright (c) 2023 AlmaLinux OS. Licensed under MIT License. Received through OSV.dev. Reformatted by exploit.cc.
CloudLinux 9
- python3-mako Fixed in 1.1.4-6.el9
Derived from AlmaLinux 9. Partial coverage: only packages taken from AlmaLinux 9 are listed.
Source: CloudLinux errata, CloudLinux Inc. Derived from: AlmaLinux, AlmaLinux OS. Copyright (c) 2023 AlmaLinux OS. Licensed under MIT License. Received through OSV.dev. Reformatted by exploit.cc.
Debian 12
- mako Fixed in 1.2.2+ds1-1
Source: Debian Security Tracker, the Debian security team. Received through OSV.dev. Reformatted by exploit.cc.
Debian 13
- mako Fixed in 1.2.2+ds1-1
Source: Debian Security Tracker, the Debian security team. Received through OSV.dev. Reformatted by exploit.cc.
Debian 14
- mako Fixed in 1.2.2+ds1-1
Source: Debian Security Tracker, the Debian security team. Received through OSV.dev. Reformatted by exploit.cc.
Ubuntu 18.04 LTS
- mako Fixed in 1.0.7+ds1-1ubuntu0.2
Source: Ubuntu, Canonical Ltd. Licensed under CC BY-SA 4.0. Received through OSV.dev. Reformatted by exploit.cc.
Ubuntu 20.04 LTS
- mako Fixed in 1.1.0+ds1-1ubuntu2.1
Source: Ubuntu, Canonical Ltd. Licensed under CC BY-SA 4.0. Received through OSV.dev. Reformatted by exploit.cc.
Ubuntu 22.04 LTS
- mako Fixed in 1.1.3+ds1-2ubuntu0.1
Source: Ubuntu, Canonical Ltd. Licensed under CC BY-SA 4.0. Received through OSV.dev. Reformatted by exploit.cc.
Ubuntu Pro 16.04 LTS
- mako Fixed in 1.0.3+ds1-1ubuntu1+esm1Available with Ubuntu Pro (Infra-only): https://ubuntu.com/pro
Source: Ubuntu, Canonical Ltd. Licensed under CC BY-SA 4.0. Received through OSV.dev. Reformatted by exploit.cc.
A release or ecosystem missing from this list has no record here. It may be unaffected or not covered by the source. Source notices and licences.