CVE-2021-20270
JSON

7.5high

Infinite Loop in Pygments

Severity
7.5high CVSS:3.1 by NVD
Exploit likelihood
2.49% (higher than 85% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
redhat
Also known as
GHSA-9w8r-397f-prfhPYSEC-2021-140

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.

Affected

Product or packageVersionsReported by
python-pygmentspython-pygments 2.7.4CVE List
pygments (PyPI)from 1.5 before 2.7.4GitHub Advisory Database, PyPA Advisory Database
pygments pygmentsfrom 1.5 up to 2.7.3NVD
redhat openshift_container_platform3.11, 4.0NVD
redhat openstack_platform10.0NVD
redhat software_collectionsNot specifiedNVD
redhat enterprise_linux7.0, 8.0NVD
fedoraproject fedora33NVD
debian debian_linux9.0, 10.0NVD

All scores

GitHub7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD5.0medium CVSS:2.0AV:N/AC:L/Au:N/C:N/I:N/A:P

Classification

What each source says

CVE List

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.

NVD (es)

Un bucle infinito en SMLLexer en Pygments versiones 1.5 hasta 2.7.3, puede conllevar a una denegación de servicio cuando se lleva a cabo el resaltado de sintaxis de un archivo fuente de Standard ML (SML), como es demostrado por la entrada que solo contiene la palabra clave "exception"

References

https://bugzilla.redhat.com/show_bug.cgi?id=1922136issue-tracking, patch, report, third-party-advisory, web
https://www.debian.org/security/2021/dsa-4889advisory, third-party-advisory, vendor-advisory, web
https://lists.debian.org/debian-lts-announce/2021/05/msg00003.htmlmailing-list, third-party-advisory, web
https://lists.debian.org/debian-lts-announce/2021/05/msg00006.htmlmailing-list, third-party-advisory, web
https://www.oracle.com/security-alerts/cpuoct2021.htmlnot-applicable, third-party-advisory, web
https://nvd.nist.gov/vuln/detail/CVE-2021-20270advisory
https://github.com/pygments/pygments/commit/f91804ff4772e3ab41f46e28d370f57898700333web
https://github.com/pygments/pygmentspackage
https://github.com/pypa/advisory-database/tree/main/vulns/pygments/PYSEC-2021-140.yamlweb
https://github.com/advisories/GHSA-9w8r-397f-prfhadvisory

Sources

SourceRecordLicence
CVE ListCVE-2021-20270 changed 2024-08-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-9w8r-397f-prfh changed 2024-10-14CC-BY-4.0
NVDCVE-2021-20270 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2021-140 changed 2023-11-08CC-BY-4.0