{"api_version":"1","generated_at":"2026-04-22T23:31:30+00:00","cve":"CVE-2022-40023","urls":{"html":"https://cve.report/CVE-2022-40023","api":"https://cve.report/api/cve/CVE-2022-40023.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2022-40023","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2022-40023"},"summary":{"title":"CVE-2022-40023","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.","state":"PUBLIC","assigner":"cve@mitre.org","published_at":"2022-09-07 13:15:00","updated_at":"2023-08-08 14:22:00"},"problem_types":["CWE-1333"],"metrics":[],"references":[{"url":"https://github.com/sqlalchemy/mako/issues/366","name":"https://github.com/sqlalchemy/mako/issues/366","refsource":"MISC","tags":[],"title":"quoted sections in tag not grouped correctly · Issue #366 · sqlalchemy/mako · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://pyup.io/vulnerabilities/CVE-2022-40023/50870/","name":"https://pyup.io/vulnerabilities/CVE-2022-40023/50870/","refsource":"MISC","tags":[],"title":"PyUp Vuln #50870","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://lists.debian.org/debian-lts-announce/2022/09/msg00026.html","name":"[debian-lts-announce] 20220921 [SECURITY] [DLA 3116-1] mako security update","refsource":"MLIST","tags":[],"title":"[SECURITY] [DLA 3116-1] mako security update","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://pyup.io/posts/pyup-discovers-redos-vulnerabilities-in-top-python-packages/","name":"https://pyup.io/posts/pyup-discovers-redos-vulnerabilities-in-top-python-packages/","refsource":"MISC","tags":[],"title":"PyUp Discovers ReDoS Vulnerabilities in Top Python Packages","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/sqlalchemy/mako/blob/c2f392e0be52dc67d1b9770ab8cce6a9c736d547/mako/ext/extract.py#L21","name":"https://github.com/sqlalchemy/mako/blob/c2f392e0be52dc67d1b9770ab8cce6a9c736d547/mako/ext/extract.py#L21","refsource":"MISC","tags":[],"title":"mako/extract.py at c2f392e0be52dc67d1b9770ab8cce6a9c736d547 · sqlalchemy/mako · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/sqlalchemy/mako/commit/925760291d6efec64fda6e9dd1fd9cfbd5be068c","name":"https://github.com/sqlalchemy/mako/commit/925760291d6efec64fda6e9dd1fd9cfbd5be068c","refsource":"MISC","tags":[],"title":"fix tag regexp to match quoted groups correctly · sqlalchemy/mako@9257602 · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://www.cve.org/CVERecord?id=CVE-2022-40023","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-40023","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2022","cve_id":"40023","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"debian","cpe5":"debian_linux","cpe6":"10.0","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2022","cve_id":"40023","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"sqlalchemy","cpe5":"mako","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[{"cve":"CVE-2022-40023","qid":"160622","title":"Oracle Enterprise Linux Security Update for python-mako (ELSA-2023-2258)"},{"cve":"CVE-2022-40023","qid":"160667","title":"Oracle Enterprise Linux Security Update for python-mako (ELSA-2023-2893)"},{"cve":"CVE-2022-40023","qid":"181066","title":"Debian Security Update for mako (DLA 3116-1)"},{"cve":"CVE-2022-40023","qid":"183358","title":"Debian Security Update for mako (CVE-2022-40023)"},{"cve":"CVE-2022-40023","qid":"198947","title":"Ubuntu Security Notification for Mako Vulnerability (USN-5625-1)"},{"cve":"CVE-2022-40023","qid":"199027","title":"Ubuntu Security Notification for Mako Vulnerability (USN-5625-2)"},{"cve":"CVE-2022-40023","qid":"241449","title":"Red Hat Update for python-mako (RHSA-2023:2258)"},{"cve":"CVE-2022-40023","qid":"241502","title":"Red Hat Update for python-mako (RHSA-2023:2893)"},{"cve":"CVE-2022-40023","qid":"355683","title":"Amazon Linux Security Advisory for python-mako : ALAS2-2023-2164"},{"cve":"CVE-2022-40023","qid":"355805","title":"Amazon Linux Security Advisory for python-mako : ALAS2023-2023-288"},{"cve":"CVE-2022-40023","qid":"378599","title":"Splunk Enterprise Third Party Package Updates for June (SVD-2023-0613)"},{"cve":"CVE-2022-40023","qid":"378647","title":"Alibaba Cloud Linux Security Update for python-mako (ALINUX3-SA-2023:0057)"},{"cve":"CVE-2022-40023","qid":"378883","title":"Splunk Enterprise August Third Party Package Updates (SVD-2023-0808)"},{"cve":"CVE-2022-40023","qid":"502580","title":"Alpine Linux Security Update for py3-mako"},{"cve":"CVE-2022-40023","qid":"504332","title":"Alpine Linux Security Update for py3-mako"},{"cve":"CVE-2022-40023","qid":"672776","title":"EulerOS Security Update for python-mako (EulerOS-SA-2023-1514)"},{"cve":"CVE-2022-40023","qid":"673346","title":"EulerOS Security Update for python-mako (EulerOS-SA-2024-1294)"},{"cve":"CVE-2022-40023","qid":"752797","title":"SUSE Enterprise Linux Security Update for python-Mako (SUSE-SU-2022:3979-1)"},{"cve":"CVE-2022-40023","qid":"903782","title":"Common Base Linux Mariner (CBL-Mariner) Security Update for python-mako (10893)"},{"cve":"CVE-2022-40023","qid":"903826","title":"Common Base Linux Mariner (CBL-Mariner) Security Update for python-mako (10892)"},{"cve":"CVE-2022-40023","qid":"904118","title":"Common Base Linux Mariner (CBL-Mariner) Security Update for python-mako (10892-1)"},{"cve":"CVE-2022-40023","qid":"904318","title":"Common Base Linux Mariner (CBL-Mariner) Security Update for python-mako (10893-1)"},{"cve":"CVE-2022-40023","qid":"941007","title":"AlmaLinux Security Update for python-mako (ALSA-2023:2258)"},{"cve":"CVE-2022-40023","qid":"941083","title":"AlmaLinux Security Update for python-mako (ALSA-2023:2893)"}]},"source_records":{"cve_program":{"CVE_data_meta":{"ASSIGNER":"cve@mitre.org","ID":"CVE-2022-40023","STATE":"PUBLIC"},"affects":{"vendor":{"vendor_data":[{"product":{"product_data":[{"product_name":"n/a","version":{"version_data":[{"version_value":"n/a"}]}}]},"vendor_name":"n/a"}]}},"data_format":"MITRE","data_type":"CVE","data_version":"4.0","description":{"description_data":[{"lang":"eng","value":"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."}]},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"n/a"}]}]},"references":{"reference_data":[{"url":"https://github.com/sqlalchemy/mako/issues/366","refsource":"MISC","name":"https://github.com/sqlalchemy/mako/issues/366"},{"url":"https://github.com/sqlalchemy/mako/commit/925760291d6efec64fda6e9dd1fd9cfbd5be068c","refsource":"MISC","name":"https://github.com/sqlalchemy/mako/commit/925760291d6efec64fda6e9dd1fd9cfbd5be068c"},{"url":"https://github.com/sqlalchemy/mako/blob/c2f392e0be52dc67d1b9770ab8cce6a9c736d547/mako/ext/extract.py#L21","refsource":"MISC","name":"https://github.com/sqlalchemy/mako/blob/c2f392e0be52dc67d1b9770ab8cce6a9c736d547/mako/ext/extract.py#L21"},{"refsource":"MISC","name":"https://pyup.io/vulnerabilities/CVE-2022-40023/50870/","url":"https://pyup.io/vulnerabilities/CVE-2022-40023/50870/"},{"refsource":"MLIST","name":"[debian-lts-announce] 20220921 [SECURITY] [DLA 3116-1] mako security update","url":"https://lists.debian.org/debian-lts-announce/2022/09/msg00026.html"},{"refsource":"MISC","name":"https://pyup.io/posts/pyup-discovers-redos-vulnerabilities-in-top-python-packages/","url":"https://pyup.io/posts/pyup-discovers-redos-vulnerabilities-in-top-python-packages/"}]}},"nvd":{"publishedDate":"2022-09-07 13:15:00","lastModifiedDate":"2023-08-08 14:22:00","problem_types":["CWE-1333"],"metrics":{"baseMetricV3":{"cvssV3":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"NONE","availabilityImpact":"HIGH","baseScore":7.5,"baseSeverity":"HIGH"},"exploitabilityScore":3.9,"impactScore":3.6}},"configurations":{"CVE_data_version":"4.0","nodes":[{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:sqlalchemy:mako:*:*:*:*:*:*:*:*","versionEndExcluding":"1.2.2","cpe_name":[]}]},{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*","cpe_name":[]}]}]}},"legacy_mitre":{"record":null,"notes":[]}}}