{"id":"CVE-2021-20270","published":"2021-03-23T16:40:22Z","modified":"2024-08-03T17:37:23Z","title":"An infinite loop in SMLLexer in Pygments versions 1.5 to 2.7.3 may lead to denial of service when performing syntax…","vendor":null,"product":null,"tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":null,"epss":{"score":0.02492,"percentile":0.8538,"provenance":"source"},"cwes":[{"id":"CWE-835","name":"Loop with Unreachable Exit Condition"}],"references":[{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=1922136","tags":["x_refsource_MISC"]},{"url":"https://www.debian.org/security/2021/dsa-4889","tags":["vendor-advisory","x_refsource_DEBIAN"]},{"url":"https://lists.debian.org/debian-lts-announce/2021/05/msg00003.html","tags":["mailing-list","x_refsource_MLIST"]},{"url":"https://lists.debian.org/debian-lts-announce/2021/05/msg00006.html","tags":["mailing-list","x_refsource_MLIST"]},{"url":"https://www.oracle.com/security-alerts/cpuoct2021.html","tags":["x_refsource_MISC"]}],"priority":{"score":17.1,"factors":[{"name":"EPSS percentile","points":17.08}]},"affectedVersions":[{"vendor":"n/a","product":"python-pygments","versions":["python-pygments 2.7.4"]}],"affected":[{"ecosystem":"PyPI","package":"Pygments","vulnerableRanges":[">=1.5, <2.7.4"],"patched":["2.7.4"],"from":["GHSA-9w8r-397f-prfh","PYSEC-2021-140"],"provenance":"source"}],"summary":{"text":"An infinite loop in the SMLLexer component of the Pygments syntax highlighting library causes it to hang when highlighting Standard ML source files, with input containing only the \"exception\" keyword triggering the condition. An attacker who can get the library to process a crafted SML file, such as by supplying content for highlighting, can cause a denial of service.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:30:24Z"},"euvd":{"id":"EUVD-2021-0207","exploited":false,"provenance":"source"}}