ADVISORIES

Vulnerability

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 Standard ML (SML) source file, as demonstrated by input that only contains the "exception" keyword.

34 advisories report this vulnerability, across 12 ecosystems.

Advisories

  • ALPINE-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 Standard ML (SML) source file, as demonstrated by input that only contains the…

    CVE-2021-20270 Alpine Updated 23 October 2026
  • ALPINE-EDGE-CVE-2021-20270
    CVE-2021-20270 Alpine Updated 18 November 2026
  • ALSA-2021:4139

    Moderate: resource-agents security, bug fix, and enhancement update

    CVE-2021-20270CVE-2021-27291 AlmaLinux Updated 29 October 2026
  • ALSA-2021:4150

    Moderate: python36:3.6 security and bug fix update

    CVE-2021-20270CVE-2021-27291 AlmaLinux Updated 2 November 2026
  • ALSA-2021:4151

    Moderate: python27:2.7 security update

    CVE-2020-27619CVE-2020-28493CVE-2021-20095CVE-2021-20270 AlmaLinux Updated 29 October 2026
  • AZL-35137

    CVE-2021-20270 affecting package python-pygments for versions less than 2.7.4-1

    CVE-2021-20270 Azure Linux Updated 22 October 2026
  • AZL-6811

    CVE-2021-20270 affecting package python-pygments for versions less than 2.4.2-7

    CVE-2021-20270 Azure Linux Updated 21 April 2026
  • DEBIAN-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 Standard ML (SML) source file, as demonstrated by input that only contains the…

    CVE-2021-20270 Debian Updated 23 October 2026
  • DLA-2590-1

    pygments - security update

    CVE-2021-20270 Debian Updated 20 November 2026
  • DLA-2648-1

    mediawiki - security update

    CVE-2021-20270CVE-2021-27291CVE-2021-30152CVE-2021-30155 Debian Updated 20 November 2026
  • DSA-4870-1

    pygments - security update

    CVE-2021-20270 Debian Updated 20 November 2026
  • DSA-4889-1

    mediawiki - security update

    CVE-2021-20270CVE-2021-27291CVE-2021-30152CVE-2021-30154 Debian Updated 20 November 2026
  • ELSA-2021-4150

    ELSA-2021-4150: python36:3.6 security and bug fix update (MODERATE)

    Moderate CVE-2021-20270CVE-2021-27291 Oracle Linux Updated 16 November 2021
  • ELSA-2021-4151

    ELSA-2021-4151: python27:2.7 security update (MODERATE)

    Moderate CVE-2020-27619CVE-2020-28493CVE-2021-20095CVE-2021-20270 Oracle Linux Updated 16 November 2021
  • ELSA-2021-9553

    ELSA-2021-9553: resource-agents security update (MODERATE)

    Moderate CVE-2021-20270CVE-2021-27291 Oracle Linux Updated 19 November 2021
  • GHSA-9w8r-397f-prfh

    Infinite Loop in Pygments

    High CVE-2021-20270 PyPI Updated 14 October 2024
  • OESA-2021-1154

    python-pygments security update

    High CVE-2021-20270CVE-2021-27291 openEuler Updated 18 August 2026
  • PYSEC-2021-140

    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…

    CVE-2021-20270 PyPI Updated 8 November 2023
  • RHSA-2021:0781

    Red Hat Security Advisory: Red Hat Ansible Automation Platform 1.2.2 security and bug fix update

    CVE-2020-15366CVE-2020-7789CVE-2021-20270CVE-2021-23980 Red Hat Updated 23 November 2026
  • RHSA-2021:3252

    Red Hat Security Advisory: python27 security update

    CVE-2020-27619CVE-2020-28493CVE-2021-20095CVE-2021-20270 Red Hat Updated 23 November 2026
  • RHSA-2021:4139

    Red Hat Security Advisory: resource-agents security, bug fix, and enhancement update

    CVE-2021-20270CVE-2021-27291 Red Hat Updated 13 November 2026
  • RHSA-2021:4150

    Red Hat Security Advisory: python36:3.6 security and bug fix update

    CVE-2021-20270CVE-2021-27291 Red Hat Updated 13 November 2026
  • RHSA-2021:4151

    Red Hat Security Advisory: python27:2.7 security update

    CVE-2020-27619CVE-2020-28493CVE-2021-20095CVE-2021-20270 Red Hat Updated 23 November 2026
  • RHVEX-CVE-2021-20270

    python-pygments: Infinite loop in SML lexer may lead to DoS

    Moderate CVE-2021-20270 Red Hat Updated 6 November 2026
  • RLSA-2021:4139

    Moderate: resource-agents security, bug fix, and enhancement update

    CVE-2021-20270CVE-2021-27291 Rocky Linux Updated 4 February 2026
  • RLSA-2021:4150

    Moderate: python36:3.6 security and bug fix update

    CVE-2021-20270CVE-2021-27291 Rocky Linux Updated 5 February 2026
  • RLSA-2021:4151

    Moderate: python27:2.7 security update

    CVE-2020-27619CVE-2020-28493CVE-2021-20095CVE-2021-20270 Rocky Linux Updated 4 February 2026
  • SUSE-SU-2021:1500-1

    Security update for python-Pygments

    CVE-2021-20270 SUSE Updated 4 February 2026
  • SUSE-SU-2021:3473-1

    Security update for python-Pygments

    CVE-2021-20270 SUSE Updated 4 February 2026
  • UBUNTU-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 Standard ML (SML) source file, as demonstrated by input that only contains the…

    CVE-2021-20270 Ubuntu Updated 24 November 2026
  • USN-4885-1

    pygments vulnerability

    CVE-2021-20270 Ubuntu Updated 24 November 2026
  • USN-4897-2

    pygments vulnerabilities

    CVE-2021-20270CVE-2021-27291 Ubuntu Updated 24 November 2026
  • openSUSE-SU-2021:1402-1

    Security update for python-Pygments

    CVE-2021-20270 openSUSE Updated 4 February 2026
  • openSUSE-SU-2026:11568-1

    python313-Pygments-2.21.0-1.1 on GA media

    CVE-2021-20270 openSUSE Updated 22 August 2026

References