{"id":"CVE-2022-40023","aliases":["CVE-2022-40023","GHSA-v973-fxgf-6xhp","PYSEC-2022-260"],"related":[],"kind":"vulnerability","state":"published","title":"mako is vulnerable to Regular Expression Denial of Service","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"es","text":"Sqlalchemy mako versiones anteriores a 1.2.2, es vulnerable a una Denegación de Servicio de expresiones Regulares cuando es usada la clase Lexer para analizar. Esto también afecta a babelplugin y linguaplugin","source":"nvd"}],"published":"2022-09-07T00:00:00.000Z","modified":"2026-06-17T05:00:47.023Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-1333"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.2.2"}],"ecosystem":"PyPI","package":"mako","purl":"pkg:pypi/mako","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"1.2.2"}],"vendor":"sqlalchemy","product":"mako","cpe":"cpe:2.3:a:sqlalchemy:mako:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"10.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"925760291d6efec64fda6e9dd1fd9cfbd5be068c"},{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.2.2"}],"ecosystem":"PyPI","package":"mako","purl":"pkg:pypi/mako","repo":"https://github.com/sqlalchemy/mako","source":"pysec"}],"references":[{"url":"https://github.com/sqlalchemy/mako/issues/366","tags":["issue-tracking","patch","report","web","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/sqlalchemy/mako/commit/925760291d6efec64fda6e9dd1fd9cfbd5be068c","tags":["fix","patch","web","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/sqlalchemy/mako/blob/c2f392e0be52dc67d1b9770ab8cce6a9c736d547/mako/ext/extract.py#L21","tags":["exploit","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://pyup.io/vulnerabilities/CVE-2022-40023/50870/","tags":["third-party-advisory","web","x-transferred"],"sources":["cvelist","nvd","pysec"]},{"url":"https://lists.debian.org/debian-lts-announce/2022/09/msg00026.html","tags":["mailing-list","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://pyup.io/posts/pyup-discovers-redos-vulnerabilities-in-top-python-packages/","tags":["exploit","third-party-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/12/msg00004.html","tags":["web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-40023","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/advisories/GHSA-v973-fxgf-6xhp","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/mako/PYSEC-2022-260.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/sqlalchemy/mako","tags":["web"],"sources":["ghsa"]},{"url":"https://pyup.io/posts/pyup-discovers-redos-vulnerabilities-in-top-python-packages","tags":["web"],"sources":["ghsa"]},{"url":"https://pyup.io/vulnerabilities/CVE-2022-40023/50870","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-40023","url":"https://www.cve.org/CVERecord?id=CVE-2022-40023","licence":"CVE Terms of Use","modified":"2025-12-03T06:05:04.544Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-v973-fxgf-6xhp","url":"https://github.com/advisories/GHSA-v973-fxgf-6xhp","licence":"CC-BY-4.0","modified":"2025-12-03T15:46:59.399Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-40023","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-40023","licence":"Public domain","modified":"2026-06-17T05:00:47.023Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2022-260","url":"https://osv.dev/vulnerability/PYSEC-2022-260","licence":"CC-BY-4.0","modified":"2023-11-08T04:10:22.118Z"}],"updatedAt":"2026-11-25T22:58:14.746Z","epss":{"score":0.02455,"percentile":0.84852,"date":"2026-12-01T12:00:22.000Z"}}