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 package | Versions | Reported by |
|---|---|---|
| python-pygments | python-pygments 2.7.4 | CVE List |
| pygments (PyPI) | from 1.5 before 2.7.4 | GitHub Advisory Database, PyPA Advisory Database |
| pygments pygments | from 1.5 up to 2.7.3 | NVD |
| redhat openshift_container_platform | 3.11, 4.0 | NVD |
| redhat openstack_platform | 10.0 | NVD |
| redhat software_collections | Not specified | NVD |
| redhat enterprise_linux | 7.0, 8.0 | NVD |
| fedoraproject fedora | 33 | NVD |
| debian debian_linux | 9.0, 10.0 | NVD |
All scores
| GitHub | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| GitHub | high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N |
| NVD | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 5.0medium CVSS:2.0 | AV: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=1922136 | issue-tracking, patch, report, third-party-advisory, web | |
| https://www.debian.org/security/2021/dsa-4889 | advisory, third-party-advisory, vendor-advisory, web | |
| https://lists.debian.org/debian-lts-announce/2021/05/msg00003.html | mailing-list, third-party-advisory, web | |
| https://lists.debian.org/debian-lts-announce/2021/05/msg00006.html | mailing-list, third-party-advisory, web | |
| https://www.oracle.com/security-alerts/cpuoct2021.html | not-applicable, third-party-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2021-20270 | advisory | |
| https://github.com/pygments/pygments/commit/f91804ff4772e3ab41f46e28d370f57898700333 | web | |
| https://github.com/pygments/pygments | package | |
| https://github.com/pypa/advisory-database/tree/main/vulns/pygments/PYSEC-2021-140.yaml | web | |
| https://github.com/advisories/GHSA-9w8r-397f-prfh | advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-20270 changed 2024-08-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-9w8r-397f-prfh changed 2024-10-14 | CC-BY-4.0 |
| NVD | CVE-2021-20270 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2021-140 changed 2023-11-08 | CC-BY-4.0 |