{"id":"CVE-2022-40896","aliases":["CVE-2022-40896","GHSA-mrwq-x4v8-fh7p","PYSEC-2023-117"],"related":[],"kind":"vulnerability","state":"published","title":"Pygments vulnerable to ReDoS","summary":"A ReDoS issue was discovered in pygments/lexers/smithy.py in pygments through 2.15.0 via SmithyLexer.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"A ReDoS issue was discovered in pygments/lexers/smithy.py in pygments through 2.15.0 via SmithyLexer.","source":"cvelist"},{"lang":"en","text":"A ReDoS issue was discovered in `pygments/lexers/smithy.py` in Pygments until 2.15.0 via SmithyLexer.","format":"markdown","source":"ghsa"}],"published":"2023-07-19T00:00:00.000Z","modified":"2026-06-17T05:02:12.853Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-434"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.15.0"}],"ecosystem":"PyPI","package":"pygments","purl":"pkg:pypi/pygments","source":"ghsa"},{"ranges":[{"status":"affected","lastAffected":"2.15.0"}],"vendor":"pygments","product":"pygments","cpe":"cpe:2.3:a:pygments:pygments:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.15.1"}],"ecosystem":"PyPI","package":"pygments","purl":"pkg:pypi/pygments","source":"pysec"}],"references":[{"url":"https://pypi.org/project/Pygments/","tags":["package","product","x-transferred"],"sources":["cvelist","nvd","pysec"]},{"url":"https://github.com/pygments/pygments/blob/master/pygments/lexers/smithy.py#L61","tags":["third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://pyup.io/posts/pyup-discovers-redos-vulnerabilities-in-top-python-packages-part-2/","tags":["exploit","patch","third-party-advisory","web","x-transferred"],"sources":["cvelist","nvd","pysec"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VUZO4BQCIY2S2KZYHERQMKURB7AHXDBO/","tags":["vendor-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/EZGMXALE3HSP4OXC7UUWIKX3OXKZDTY3/","tags":["vendor-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/EZGMXALE3HSP4OXC7UUWIKX3OXKZDTY3/","tags":[],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VUZO4BQCIY2S2KZYHERQMKURB7AHXDBO/","tags":[],"sources":["cvelist","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-40896","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/pygments/pygments/commit/97eb3d5ec7c1b3ea4fcf9dee30a2309cf92bd194","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/pygments/pygments/commit/dd52102c38ebe78cd57748e09f38929fd283ad04","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/pygments/pygments/commit/fdf182a7af85b1deeeb637ca970d31935e7c9d52","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/pygments/pygments","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/pygments/PYSEC-2023-117.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/EZGMXALE3HSP4OXC7UUWIKX3OXKZDTY3","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VUZO4BQCIY2S2KZYHERQMKURB7AHXDBO","tags":["web"],"sources":["ghsa"]},{"url":"https://pypi.org/project/Pygments","tags":["web"],"sources":["ghsa"]},{"url":"https://pyup.io/posts/pyup-discovers-redos-vulnerabilities-in-top-python-packages-part-2","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/advisories/GHSA-mrwq-x4v8-fh7p","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"mitre","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-11-27T14:28:52.133Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-40896","url":"https://www.cve.org/CVERecord?id=CVE-2022-40896","licence":"CVE Terms of Use","modified":"2024-11-27T14:28:58.875Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-mrwq-x4v8-fh7p","url":"https://github.com/advisories/GHSA-mrwq-x4v8-fh7p","licence":"CC-BY-4.0","modified":"2024-10-24T22:27:47.389Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-40896","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-40896","licence":"Public domain","modified":"2026-06-17T05:02:12.853Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2023-117","url":"https://osv.dev/vulnerability/PYSEC-2023-117","licence":"CC-BY-4.0","modified":"2026-06-10T17:01:44.543Z"}],"updatedAt":"2026-11-25T22:58:19.473Z","epss":{"score":0.00519,"percentile":0.4556,"date":"2026-12-01T12:00:22.000Z"}}