PT-2020-6145
CVE-2021-20270
·
Published
2020-12-10
·
Updated
2026-10-31
Description by
CVSS 4.0
8.7
HighMetricsAV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Name of the Vulnerable Software and Affected Versions
Pygments versions 1.5 to 2.7.3
Description
The issue is related to an infinite loop in the SMLLexer function of the Pygments library. This can lead to a denial of service when performing syntax highlighting of a Standard ML (SML) source file. The vulnerability can be exploited by a remote attacker, potentially causing the service to become unresponsive. The issue is demonstrated by input that only contains the "exception" keyword.
Recommendations
For Pygments versions 1.5 to 2.7.3, consider disabling the SMLLexer function until a patch is available to prevent potential denial of service attacks.
At the moment, there is no information about a newer version that contains a fix for this vulnerability.
Found an issue in the description? Have something to add? Feel free to write us 👾