All reports
High

Infinite Loop in Pygments

Affected versions

Version ranges need review.

Affected versions
>= 1.5, < 2.7.4
Fixed version
2.7.4
Affected versions
>=1.5 <2.7.4
Fixed version
2.7.4
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported

Exploitation

CVE-2021-20270

Probability of exploitation in the next 30 days: 2.76%

FIRST EPSS · 2026-11-20

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.

Links