CVE-2022-40023

Exp

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.

Published: 2022-09-07 Last update: 2025-12-03 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2022-40023 is rated High Exploit Risk (71.8/100): CVSS High severity, with medium exploitation likelihood (EPSS 0.95%). Core evidence: 2 public exploit reference(s) are indexed (Exploit-DB). Mandatory action: Public exploits are available—assess exposure, apply mitigations, and prioritize patching.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Public exploit references (Exploit-DB) for CVE-2022-40023

EDB-ID Source Kind Published Link
nvd_ref exploit_tag Exploit-DB ↗
nvd_ref exploit_tag Exploit-DB ↗

Exploit prediction scoring system (EPSS) score for CVE-2022-40023

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2025-12-03 0.70% 0.95% +0.25%
2 2025-11-21 1.65% 0.70% -0.95%
3 2025-11-18 1.65%

Full EPSS history (22 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2022-40023

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
7.5 3.1 HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:N)
Data isn’t meaningfully altered or forged.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
3.9 3.6 [email protected]

Weakness enumeration for CVE-2022-40023

GitHub Security Advisory for CVE-2022-40023

GHSA-v973-fxgf-6xhp · Severity: high · Ecosystem: pip — mako is vulnerable to Regular Expression Denial of Service

OS Trackers for CVE-2022-40023

vendor priority summary link
alpine CVE-2022-40023: 1 source package rows (py3-mako); 7 state rows across 7 repos (3.17-main, 3.18-main, 3.19-main, 3.20-main, 3.21-main, 3.22-main, edge-main); fixed 7, open 0. https://security.alpinelinux.org/vuln/CVE-2022-40023
debian not yet assigned CVE-2022-40023 not yet assigned priority: Debian including 1 source packages (mako), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 5. https://security-tracker.debian.org/tracker/CVE-2022-40023
redhat medium https://access.redhat.com/security/cve/CVE-2022-40023
suse medium CVE-2022-40023 severity moderate: SUSE including 14 source package names (1.10.1.16.4.5.328:python3-Mako-1.0.7-150000.3.3.1, python-Mako-1.0.7-3.3.1, …), 29 product×package rows across 26 product lines (Container ses/7.1/cephcsi/cephcsi, Container ses/7.1/rook/ceph, … (26 product lines)): Fixed 29. https://www.suse.com/security/cve/CVE-2022-40023/
ubuntu medium CVE-2022-40023 medium priority: Ubuntu including 1 source packages (mako), 8 status rows across 8 suites (bionic, focal, jammy, kinetic, lunar, trusty, upstream, xenial): released 7, ignored 1. https://ubuntu.com/security/CVE-2022-40023

Affected software / configurations for CVE-2022-40023

Vendor Product Version Raw CPE
sqlalchemy mako < 1.2.2 cpe:2.3:a:sqlalchemy:mako:*:*:*:*:*:*:*:*
debian debian_linux 10.0 cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*

References for CVE-2022-40023

cvelogic Threat Intelligence