{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2021-20270","id":"CVE-2021-20270","title":"Infinite Loop in Pygments","description":"An infinite loop in SMLLexer in Pygments versions 1.5 to 2.7.3 may lead to denial of service when performing syntax highlighting of a Standard ML (SML) source file, as demonstrated by input that only contains the \"exception\" keyword.","descriptionLong":"An infinite loop in SMLLexer in Pygments versions 1.5 to 2.7.3 may lead to denial of service when performing syntax highlighting of a Standard ML (SML) source file, as demonstrated by input that only contains the \"exception\" keyword.","published":"2021-03-23T16:40:22.000Z","updated":"2026-08-22T18:49:58.976704237Z","reserved":"2020-12-17T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"redhat","metric":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"NVD"},"metrics":[{"version":"4.0","score":null,"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","source":"GitHub"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"NVD"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"OSV"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"GitHub"},{"version":"2.0","score":5,"vector":"AV:N/AC:L/Au:N/C:N/I:N/A:P","rating":"medium","source":"NVD"}],"rating":"high","products":["python-pygments"],"affectedProducts":[{"vendor":"n/a","product":"python-pygments","defaultStatus":null,"versions":[{"status":"affected","version":"python-pygments 2.7.4"}],"platforms":[]}],"packages":[{"ecosystem":"PyPI","name":"pygments","purl":"pkg:pypi/pygments","ranges":[">=1.5 <2.7.4"],"fixed":["2.7.4"],"advisory":"GHSA-9w8r-397f-prfh"}],"cwes":["CWE-835"],"aliases":["GHSA-9w8r-397f-prfh","PYSEC-2021-140"],"references":[{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=1922136","tags":["x_refsource_MISC","x_transferred","Issue Tracking","Patch","Third Party Advisory","fix","web","report"]},{"url":"https://www.debian.org/security/2021/dsa-4889","tags":["vendor-advisory","x_refsource_DEBIAN","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://lists.debian.org/debian-lts-announce/2021/05/msg00003.html","tags":["mailing-list","x_refsource_MLIST","x_transferred","Mailing List","Third Party Advisory","advisory","web"]},{"url":"https://lists.debian.org/debian-lts-announce/2021/05/msg00006.html","tags":["mailing-list","x_refsource_MLIST","x_transferred","Mailing List","Third Party Advisory","advisory","web"]},{"url":"https://www.oracle.com/security-alerts/cpuoct2021.html","tags":["x_refsource_MISC","x_transferred","Not Applicable","Third Party Advisory","advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-20270","tags":["advisory"]},{"url":"https://github.com/pygments/pygments/commit/f91804ff4772e3ab41f46e28d370f57898700333","tags":["web"]},{"url":"https://github.com/pygments/pygments","tags":["package"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/pygments/PYSEC-2021-140.yaml","tags":["web"]},{"url":"https://github.com/advisories/GHSA-9w8r-397f-prfh","tags":["advisory"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.02759,"epssPercentile":0.86546,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2021-20270","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-20270","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2021-20270","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-9w8r-397f-prfh","ok":true,"note":"GHSA-9w8r-397f-prfh"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2021-20270","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}