GitHub Advisoryadvisory · PyPI
GHSA-9w8r-397f-prfh Infinite Loop in Pygments
HIGH
Official page ↗
- Aliases
- CVE-2021-20270
- Ecosystem
- PyPI
- Packages
- Pygments
- Severity
- High
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Weaknesses
- CWE-835
- Reviewed
- 2021-04-12
Affected packages
• PyPI Pygments: >= 1.5, < 2.7.4 → fixed in 2.7.4
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.
Related
Alias · CVE (1)
- CVE-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… vulnerability
Weakness · CWE (1)
- CWE-835 Loop with Unreachable Exit Condition weakness
References
- https://nvd.nist.gov/vuln/detail/CVE-2021-20270 advisory
- https://github.com/pygments/pygments/commit/f91804ff4772e3ab41f46e28d370f57898700333 web
- https://bugzilla.redhat.com/show_bug.cgi?id=1922136 web
- https://github.com/pygments/pygments package
- https://github.com/pypa/advisory-database/tree/main/vulns/pygments/PYSEC-2021-140.yaml web
- https://lists.debian.org/debian-lts-announce/2021/05/msg00003.html web
- https://lists.debian.org/debian-lts-announce/2021/05/msg00006.html web
- https://www.debian.org/security/2021/dsa-4889 web
- https://www.oracle.com/security-alerts/cpuoct2021.html web