CVE-2022-40023

HIGH
Published Sep 7, 20223y ago · Modified Jun 17, 20262w ago
7.5 CVSS 3.1
High
Find Similar
Published Sep 7, 2022 3y ago
Last Modified Jun 17, 2026 2w ago

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.

CVSS Details

Base Score
7.5
Exploitability
3.9
Impact
3.6
Vector string
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Attack Vector Network
Attack Complexity Low
Privileges Required None
User Interaction None
Scope Unchanged
Confidentiality None
Integrity None
Availability High

Threat Intelligence

No active exploitation signals — not in CISA KEV and no EPSS score yet.

Exploit & Patch Status
Public Exploit Known
Patch Available

Weaknesses 1

CWE-1333

Affected Products 2

VendorProductVersionRange
sqlalchemymako* <1.2.2
debiandebian_linux10.0any

References 7

  • github.com https://github.com/sqlalchemy/mako/blob/c2f392e0be52dc67d1b9770ab8cce6a9c736d547/mako/ext/extract.py#L21
    ExploitThird Party Advisory
  • github.com https://github.com/sqlalchemy/mako/commit/925760291d6efec64fda6e9dd1fd9cfbd5be068c
    Patch
  • github.com https://github.com/sqlalchemy/mako/issues/366
    Issue TrackingPatch
  • lists.debian.org https://lists.debian.org/debian-lts-announce/2022/09/msg00026.html
    Mailing ListThird Party Advisory
  • lists.debian.org https://lists.debian.org/debian-lts-announce/2025/12/msg00004.html
  • pyup.io https://pyup.io/posts/pyup-discovers-redos-vulnerabilities-in-top-python-packages/
    ExploitThird Party Advisory
  • pyup.io https://pyup.io/vulnerabilities/CVE-2022-40023/50870/
    Third Party Advisory

Remediation

  • github.com https://github.com/sqlalchemy/mako/commit/925760291d6efec64fda6e9dd1fd9cfbd5be068c
    Patch
  • github.com https://github.com/sqlalchemy/mako/issues/366
    Issue TrackingPatch