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

High 7.5 Published Updated

An attacker can cause a denial of service in Mako templates by triggering a regular expression denial of service via the Lexer class.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2022-40023?

CVE-2022-40023 is a high-severity denial of service vulnerability in Debian Debian Linux, published on 7 Sep 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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.

Weakness: CWE-1333

Which versions are affected by CVE-2022-40023?

3 open source packages ship an affected version, including mako. It affects 2 products.

PackageAffectedFixed in
mako PyPIAll versions1.2.2
mako PyPIAll versions1.2.2
mako PyPIAll versions1.2.2
Linux distribution packages (21)
python3-mako AlmaLinux:8All versions1.0.6-14.el8
python3-mako AlmaLinux:9All versions1.1.4-6.el9
python-mako Red Hat:enterprise_linux:8::appstreamAll versions0:1.0.6-14.el8
python3-mako Red Hat:enterprise_linux:8::appstreamAll versions0:1.0.6-14.el8
python-mako Red Hat:enterprise_linux:9::appstreamAll versions0:1.1.4-6.el9
python3-mako Red Hat:enterprise_linux:9::appstreamAll versions0:1.1.4-6.el9
python-mako Rocky Linux:8All versions0:1.0.6-14.el8
python-mako Rocky Linux:9All versions0:1.1.4-6.el9
python-Mako SUSE:HPE Helion OpenStack 8All versions1.0.7-3.3.1
python-Mako SUSE:Linux Enterprise Module for Basesystem 15 SP3All versions1.0.7-150000.3.3.1
python-Mako SUSE:Linux Enterprise Module for Basesystem 15 SP4All versions1.0.7-150000.3.3.1
python-Mako SUSE:Linux Enterprise Module for Package Hub 15 SP3All versions1.0.7-150000.3.3.1
python-Mako SUSE:Linux Enterprise Module for Package Hub 15 SP4All versions1.0.7-150000.3.3.1
python-Mako SUSE:OpenStack Cloud 8All versions1.0.7-3.3.1
python-Mako SUSE:OpenStack Cloud 9All versions1.0.7-4.3.1
python-Mako SUSE:OpenStack Cloud Crowbar 8All versions1.0.7-3.3.1
python-Mako SUSE:OpenStack Cloud Crowbar 9All versions1.0.7-4.3.1
python-Mako openSUSE:Leap 15.3All versions1.0.7-150000.3.3.1
python-Mako openSUSE:Leap 15.4All versions1.0.7-150000.3.3.1
python-Mako openSUSE:TumbleweedAll versions1.3.0-2.1
python-Mako openSUSE:TumbleweedAll versions1.4.1-1.1

Products include Debian Debian Linux, Sqlalchemy Mako.

How do I fix CVE-2022-40023?

Upgrade mako to 1.2.2 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2022-40023 being exploited?

There is no known exploitation of CVE-2022-40023 in the wild and no public exploit code.

All Debian Debian Linux vulnerabilities

Sources

Also known as ALPINE-CVE-2022-40023, ALSA-2023:2258, ALSA-2023:2893, AZL-10892, DEBIAN-CVE-2022-40023, DLA-3116-1 and 16 more.

Is CVE-2022-40023 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free