{"answers":{"affected":"3 open source packages ship an affected version, including mako. It affects 2 products.","exploited":"There is no known exploitation of CVE-2022-40023 in the wild and no public exploit code.","fix":"Upgrade mako to 1.2.2 or later.","what":"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."},"fix_prompt":"Check this codebase for CVE-2022-40023 and fix it if it is affected.\n\nWhat it is: 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.\nExploitation: There is no known exploitation of CVE-2022-40023 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- mako (PyPI): affected all versions; fixed in 1.2.2\n- mako (PyPI): affected all versions; fixed in 1.2.2\n- mako (PyPI): affected all versions; fixed in 1.2.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2022-40023/ (Markdown: https://insights.sbomify.com/CVE-2022-40023/index.md)","id":"CVE-2022-40023","markdown":"https://insights.sbomify.com/CVE-2022-40023/index.md","name":"CVE-2022-40023","record":{"aliases":["ALPINE-CVE-2022-40023","ALSA-2023:2258","ALSA-2023:2893","AZL-10892","DEBIAN-CVE-2022-40023","DLA-3116-1","DLA-4393-1","GHSA-v973-fxgf-6xhp","MGASA-2022-0350","OESA-2023-1683","PYSEC-2022-260","RHSA-2023:2258","RHSA-2023:2893","RLSA-2023:2258","RLSA-2023:2893","SUSE-SU-2022:3700-1","SUSE-SU-2022:3701-1","SUSE-SU-2022:3979-1","UBUNTU-CVE-2022-40023","USN-5625-1","openSUSE-SU-2024:13610-1","openSUSE-SU-2026:11567-1"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":false,"product_category":"Python templating library","requires_auth":"none","summary":"An attacker can cause a denial of service in Mako templates by triggering a regular expression denial of service via the Lexer class.","user_interaction":"not_required","vuln_class":"denial_of_service"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"mitre","cpe":[{"product":"debian_linux","vendor":"debian"},{"product":"mako","vendor":"sqlalchemy"}],"cvss":{"score":7.5,"severity":"high","source":"nvd","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","version":"3.1"},"cwes":[{"id":"CWE-1333","name":"Inefficient Regular Expression Complexity"}],"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.","ecosystems":["AlmaLinux:8","AlmaLinux:9","PyPI","Red Hat:enterprise_linux:8::appstream","Red Hat:enterprise_linux:9::appstream","Rocky Linux:8","Rocky Linux:9","SUSE:HPE Helion OpenStack 8","SUSE:Linux Enterprise Module for Basesystem 15 SP3","SUSE:Linux Enterprise Module for Basesystem 15 SP4","SUSE:Linux Enterprise Module for Package Hub 15 SP3","SUSE:Linux Enterprise Module for Package Hub 15 SP4","SUSE:OpenStack Cloud 8","SUSE:OpenStack Cloud 9","SUSE:OpenStack Cloud Crowbar 8","SUSE:OpenStack Cloud Crowbar 9","openSUSE:Leap 15.3","openSUSE:Leap 15.4","openSUSE:Tumbleweed"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"mako is vulnerable to Regular Expression Denial of Service","id":"CVE-2022-40023","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":"debian:debian_linux","products":["debian:debian_linux"],"type":"denial_of_service","year":"2022"},"n_packages":24,"n_references":6,"next":{"headline":"SQL injection in n/a","id":"CVE-2022-40026"},"packages":[{"ecosystem":"PyPI","fixed":["1.2.2"],"introduced":["0"],"last_affected":[],"package":"mako","purl":null,"source":"GHSA-v973-fxgf-6xhp"},{"ecosystem":"PyPI","fixed":["1.2.2"],"introduced":["0"],"last_affected":[],"package":"mako","purl":"pkg:pypi/mako","source":"GHSA-v973-fxgf-6xhp"},{"ecosystem":"PyPI","fixed":["1.2.2"],"introduced":["0"],"last_affected":[],"package":"mako","purl":"pkg:pypi/mako","source":"PYSEC-2022-260"},{"ecosystem":"AlmaLinux:8","fixed":["1.0.6-14.el8"],"introduced":["0"],"last_affected":[],"package":"python3-mako","purl":"pkg:rpm/almalinux/python3-mako","source":"ALSA-2023:2893"},{"ecosystem":"AlmaLinux:9","fixed":["1.1.4-6.el9"],"introduced":["0"],"last_affected":[],"package":"python3-mako","purl":"pkg:rpm/almalinux/python3-mako","source":"ALSA-2023:2258"},{"ecosystem":"Red Hat:enterprise_linux:8::appstream","fixed":["0:1.0.6-14.el8"],"introduced":["0"],"last_affected":[],"package":"python-mako","purl":"pkg:rpm/redhat/python-mako","source":"RHSA-2023:2893"},{"ecosystem":"Red Hat:enterprise_linux:8::appstream","fixed":["0:1.0.6-14.el8"],"introduced":["0"],"last_affected":[],"package":"python3-mako","purl":"pkg:rpm/redhat/python3-mako","source":"RHSA-2023:2893"},{"ecosystem":"Red Hat:enterprise_linux:9::appstream","fixed":["0:1.1.4-6.el9"],"introduced":["0"],"last_affected":[],"package":"python-mako","purl":"pkg:rpm/redhat/python-mako","source":"RHSA-2023:2258"},{"ecosystem":"Red Hat:enterprise_linux:9::appstream","fixed":["0:1.1.4-6.el9"],"introduced":["0"],"last_affected":[],"package":"python3-mako","purl":"pkg:rpm/redhat/python3-mako","source":"RHSA-2023:2258"},{"ecosystem":"Rocky Linux:8","fixed":["0:1.0.6-14.el8"],"introduced":["0"],"last_affected":[],"package":"python-mako","purl":"pkg:rpm/rocky-linux/python-mako?distro=rocky-linux-8-x86-64\u0026epoch=0","source":"RLSA-2023:2893"},{"ecosystem":"Rocky Linux:9","fixed":["0:1.1.4-6.el9"],"introduced":["0"],"last_affected":[],"package":"python-mako","purl":"pkg:rpm/rocky-linux/python-mako?distro=rocky-linux-9-x86-64\u0026epoch=0","source":"RLSA-2023:2258"},{"ecosystem":"SUSE:HPE Helion OpenStack 8","fixed":["1.0.7-3.3.1"],"introduced":["0"],"last_affected":[],"package":"python-Mako","purl":"pkg:rpm/suse/python-Mako\u0026distro=HPE%20Helion%20OpenStack%208","source":"SUSE-SU-2022:3701-1"},{"ecosystem":"SUSE:Linux Enterprise Module for Basesystem 15 SP3","fixed":["1.0.7-150000.3.3.1"],"introduced":["0"],"last_affected":[],"package":"python-Mako","purl":"pkg:rpm/suse/python-Mako\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP3","source":"SUSE-SU-2022:3979-1"},{"ecosystem":"SUSE:Linux Enterprise Module for Basesystem 15 SP4","fixed":["1.0.7-150000.3.3.1"],"introduced":["0"],"last_affected":[],"package":"python-Mako","purl":"pkg:rpm/suse/python-Mako\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP4","source":"SUSE-SU-2022:3979-1"},{"ecosystem":"SUSE:Linux Enterprise Module for Package Hub 15 SP3","fixed":["1.0.7-150000.3.3.1"],"introduced":["0"],"last_affected":[],"package":"python-Mako","purl":"pkg:rpm/suse/python-Mako\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Package%20Hub%2015%20SP3","source":"SUSE-SU-2022:3979-1"},{"ecosystem":"SUSE:Linux Enterprise Module for Package Hub 15 SP4","fixed":["1.0.7-150000.3.3.1"],"introduced":["0"],"last_affected":[],"package":"python-Mako","purl":"pkg:rpm/suse/python-Mako\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Package%20Hub%2015%20SP4","source":"SUSE-SU-2022:3979-1"},{"ecosystem":"SUSE:OpenStack Cloud 8","fixed":["1.0.7-3.3.1"],"introduced":["0"],"last_affected":[],"package":"python-Mako","purl":"pkg:rpm/suse/python-Mako\u0026distro=SUSE%20OpenStack%20Cloud%208","source":"SUSE-SU-2022:3701-1"},{"ecosystem":"SUSE:OpenStack Cloud 9","fixed":["1.0.7-4.3.1"],"introduced":["0"],"last_affected":[],"package":"python-Mako","purl":"pkg:rpm/suse/python-Mako\u0026distro=SUSE%20OpenStack%20Cloud%209","source":"SUSE-SU-2022:3700-1"},{"ecosystem":"SUSE:OpenStack Cloud Crowbar 8","fixed":["1.0.7-3.3.1"],"introduced":["0"],"last_affected":[],"package":"python-Mako","purl":"pkg:rpm/suse/python-Mako\u0026distro=SUSE%20OpenStack%20Cloud%20Crowbar%208","source":"SUSE-SU-2022:3701-1"},{"ecosystem":"SUSE:OpenStack Cloud Crowbar 9","fixed":["1.0.7-4.3.1"],"introduced":["0"],"last_affected":[],"package":"python-Mako","purl":"pkg:rpm/suse/python-Mako\u0026distro=SUSE%20OpenStack%20Cloud%20Crowbar%209","source":"SUSE-SU-2022:3700-1"},{"ecosystem":"openSUSE:Leap 15.3","fixed":["1.0.7-150000.3.3.1"],"introduced":["0"],"last_affected":[],"package":"python-Mako","purl":"pkg:rpm/opensuse/python-Mako\u0026distro=openSUSE%20Leap%2015.3","source":"SUSE-SU-2022:3979-1"},{"ecosystem":"openSUSE:Leap 15.4","fixed":["1.0.7-150000.3.3.1"],"introduced":["0"],"last_affected":[],"package":"python-Mako","purl":"pkg:rpm/opensuse/python-Mako\u0026distro=openSUSE%20Leap%2015.4","source":"SUSE-SU-2022:3979-1"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["1.3.0-2.1"],"introduced":["0"],"last_affected":[],"package":"python-Mako","purl":"pkg:rpm/opensuse/python-Mako\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2024:13610-1"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["1.4.1-1.1"],"introduced":["0"],"last_affected":[],"package":"python-Mako","purl":"pkg:rpm/opensuse/python-Mako\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2026:11567-1"}],"prev":{"headline":"Command injection in n/a","id":"CVE-2022-40022"},"products":["n/a"],"published":"2022-09-07","related":[{"cvss_score":10,"headline":"ProFTPD Improper Access Control","id":"CVE-2015-3306","kev_date_added":"2026-10-08","published":"2015-05-18"},{"cvss_score":9.9,"headline":"RoundCube Webmail Deserialization of Untrusted Data","id":"CVE-2025-49113","kev_date_added":"2026-02-20","published":"2025-06-02"},{"cvss_score":9.8,"headline":"GNU InetUtils Argument Injection","id":"CVE-2026-24061","kev_date_added":"2026-01-26","published":"2026-01-21"},{"cvss_score":9.8,"headline":"Linux Kernel Improper Check for Unusual or Exceptional Conditions","id":"CVE-2025-39682","kev_date_added":"2026-09-18","published":"2025-09-05"},{"cvss_score":9.8,"headline":"Mozilla Firefox Use-After-Free","id":"CVE-2024-9680","kev_date_added":"2024-10-15","published":"2024-10-09"},{"cvss_score":9.8,"headline":"RARLAB UnRAR Directory Traversal","id":"CVE-2022-30333","kev_date_added":"2022-08-09","published":"2022-05-09"},{"cvss_score":9.8,"headline":"Roundcube Webmail SQL Injection","id":"CVE-2021-44026","kev_date_added":"2023-06-22","published":"2021-11-19"}],"sources":[{"class":"attribution","licence":"MIT","name":"AlmaLinux","prefix":"ALSA"},{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"CC BY 4.0","name":"Red Hat","prefix":"RHSA"},{"class":"attribution","licence":"BSD","name":"Rocky Linux","prefix":"RLSA"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"SUSE"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"openSUSE"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2025-12-03","vendors":["n/a"]},"summary":"An attacker can cause a denial of service in Mako templates by triggering a regular expression denial of service via the Lexer class.","url":"https://insights.sbomify.com/CVE-2022-40023/"}