CVE-2021-20270
published 2021-03-23CVE-2021-20270: 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…
PriorityP336high7.5CVSS 3.1
AVNACLPRNUINSUCNINAH
EPSS
2.76%
84.6th percentile
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.
Affected
29 ranges· showing 25
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | debian_linux | — | — |
| debian | debian_linux | — | — |
| debian | mediawiki | < mediawiki 1:1.35.2-1 (bookworm) | mediawiki 1:1.35.2-1 (bookworm) |
| debian | pygments | < mediawiki 1:1.35.2-1 (bookworm) | mediawiki 1:1.35.2-1 (bookworm) |
| fedoraproject | fedora | — | — |
| mediawiki | mediawiki | >= 0 < 1:1.35.2-1 | 1:1.35.2-1 |
| mediawiki | mediawiki | >= 0 < 1:1.35.2-1 | 1:1.35.2-1 |
| mediawiki | mediawiki | >= 0 < 1:1.35.2-1 | 1:1.35.2-1 |
| mediawiki | mediawiki | >= 0 < 1:1.35.2-1 | 1:1.35.2-1 |
| msrc | azl3_python-pygments_2.5.2-1_on_azure_linux_3.0 | — | — |
| msrc | azl3_python-pygments_2.7.4-1_on_azure_linux_3.0 | — | — |
| msrc | azure_linux_3.0_arm | — | — |
| msrc | azure_linux_3.0_x64 | — | — |
| msrc | cbl_mariner_1.0_arm | — | — |
| msrc | cbl_mariner_1.0_x64 | — | — |
| msrc | cbl_mariner_2.0_arm | — | — |
| msrc | cbl_mariner_2.0_x64 | — | — |
| pygments | pygments | >= 0 < 2.7.1+dfsg-2 | 2.7.1+dfsg-2 |
| pygments | pygments | >= 0 < 2.7.1+dfsg-2 | 2.7.1+dfsg-2 |
| pygments | pygments | >= 0 < 2.7.1+dfsg-2 | 2.7.1+dfsg-2 |
| pygments | pygments | >= 0 < 2.7.1+dfsg-2 | 2.7.1+dfsg-2 |
| pygments | pygments | >= 0 < 1.6+dfsg-1ubuntu1.1+esm1 | 1.6+dfsg-1ubuntu1.1+esm1 |
| pygments | pygments | >= 1.5 < 2.7.4 | 2.7.4 |
| pygments | pygments | 1.5 – 2.7.3 | — |
| redhat | enterprise_linux | — | — |
CVSS provenance
nvdv3.17.5HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
nvdv2.05.0MEDIUMAV:N/AC:L/Au:N/C:N/I:N/A:P
osv7.5HIGH
vendor_debian7.5HIGH
vendor_msrc7.5HIGH
vendor_redhat7.5HIGH
vendor_ubuntu7.5HIGH
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
Ubuntu
Pygments vulnerabilities
vendor_ubuntu·2023-08-14·CVSS 7.5
CVE-2021-20270 [HIGH] Pygments vulnerabilities
Title: Pygments vulnerabilities
Summary: Pygments could be made to hang if it opened a specially crafted file.
USN-4897-1 fixed several vulnerabilities in Pygments. This update provides
the corresponding update for Ubuntu 14.04 LTS.
Original advisory details:
Ben Caller discovered that Pygments incorrectly handled parsing certain
files. If a user or automated system were tricked into parsing a specially
crafted file, a remote attacker could cause Pygments to hang or consume
resources, resulting in a denial of service. (CVE-2021-27291)
It was discovered that Pygments incorrectly handled parsing certain
files. An attacker could possibly use this issue to cause a denial of
service. (CVE-2021-20270)
Instructions: In general, a standard system update will make all the necessary changes.
Ubuntu
Pygments vulnerability
vendor_ubuntu·2021-03-22
CVE-2021-20270 Pygments vulnerability
Title: Pygments vulnerability
Summary: pygments could be made to hang if it opened a specially crafted file.
It was discovered that Pygments incorrectly handled parsing SML files. If a
user or automated system were tricked into parsing a specially crafted SML
file, a remote attacker could cause Pygments to hang, resulting in a denial
of service.
Instructions: In general, a standard system update will make all the necessary changes.
Microsoft
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 c
vendor_msrc·2021-03-09·CVSS 7.5
CVE-2021-20270 [HIGH] CWE-835 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 c
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.
FAQ: Is Azure Linux the only Microsoft product that includes this open-source library and is therefore potentially affected by this vulnerability?
One of the main benefits to our customers who choose to use the Azure Linux distro is the commitment to keep it up to date with the most recent and most secure versions of the open source libraries with which the distro is composed. Microsoft is committed to transparency in this work which is why we began publishing CSAF/VEX in October 2025. See this blog post for more information. If impact to additional products i
Debian
CVE-2021-20270: mediawiki - An infinite loop in SMLLexer in Pygments versions 1.5 to 2.7.3 may lead to denia...
vendor_debian·2021·CVSS 7.5
CVE-2021-20270 [HIGH] CVE-2021-20270: mediawiki - An infinite loop in SMLLexer in Pygments versions 1.5 to 2.7.3 may lead to denia...
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.
Scope: local
bookworm: resolved (fixed in 1:1.35.2-1)
bullseye: resolved (fixed in 1:1.35.2-1)
forky: resolved (fixed in 1:1.35.2-1)
sid: resolved (fixed in 1:1.35.2-1)
trixie: resolved (fixed in 1:1.35.2-1)
Red Hat
python-pygments: Infinite loop in SML lexer may lead to DoS
vendor_redhat·2020-12-10·CVSS 7.5
CVE-2021-20270 [HIGH] CWE-835 python-pygments: Infinite loop in SML lexer may lead to DoS
python-pygments: Infinite loop in SML lexer may lead to DoS
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.
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.
Statement: In OpenShift Container Platform 3.11, the vulnerable version of python-pygments is embedded in the google-cloud-sdk package, which is shipped in the openshift-ansible container (aos3-installation-container). As the access to the openshift-ansible container i
OSV
pygments vulnerabilities
osv·2023-08-14·CVSS 7.5
CVE-2021-27291 [HIGH] pygments vulnerabilities
pygments vulnerabilities
USN-4897-1 fixed several vulnerabilities in Pygments. This update provides
the corresponding update for Ubuntu 14.04 LTS.
Original advisory details:
Ben Caller discovered that Pygments incorrectly handled parsing certain
files. If a user or automated system were tricked into parsing a specially
crafted file, a remote attacker could cause Pygments to hang or consume
resources, resulting in a denial of service. (CVE-2021-27291)
It was discovered that Pygments incorrectly handled parsing certain
files. An attacker could possibly use this issue to cause a denial of
service. (CVE-2021-20270)
GHSA
Infinite Loop in Pygments
ghsa·2021-04-20
CVE-2021-20270 [HIGH] CWE-835 Infinite Loop in Pygments
Infinite Loop in Pygments
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.
OSV
Infinite Loop in Pygments
osv·2021-04-20
CVE-2021-20270 [HIGH] Infinite Loop in Pygments
Infinite Loop in Pygments
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.
OSV
CVE-2021-20270: An infinite loop in SMLLexer in Pygments versions 1
osv·2021-03-23·CVSS 7.5
CVE-2021-20270 [HIGH] CVE-2021-20270: An infinite loop in SMLLexer in Pygments versions 1
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.
No detection rules found.
No public exploits indexed.
No writeups or analysis indexed.
https://bugzilla.redhat.com/show_bug.cgi?id=1922136https://lists.debian.org/debian-lts-announce/2021/05/msg00003.htmlhttps://lists.debian.org/debian-lts-announce/2021/05/msg00006.htmlhttps://www.debian.org/security/2021/dsa-4889https://www.oracle.com/security-alerts/cpuoct2021.htmlhttps://bugzilla.redhat.com/show_bug.cgi?id=1922136https://lists.debian.org/debian-lts-announce/2021/05/msg00003.htmlhttps://lists.debian.org/debian-lts-announce/2021/05/msg00006.htmlhttps://www.debian.org/security/2021/dsa-4889https://www.oracle.com/security-alerts/cpuoct2021.html
2021-03-23
Published