Predictive Vulnerability Intelligence.

Product

  • Product
  • Pricing
  • Documentation

Company

  • About
  • Partnerships
  • Blog
  • Support

Legal

  • Terms
  • Privacy
  • Data Licensing

© 2026 FAUCET Technologies LLC. All rights reserved.

CVE-2021-20270

25
FAUCET Score

CVE-2021-20270 is a denial-of-service vulnerability affecting Pygments versions 1.5 to 2.7.3, as well as products like Debian, Fedora, and Red Hat that incorporate these versions. The flaw resides in the SMLLexer component, where an infinite loop can be triggered by specific Standard ML (SML) source code, such as input containing only the "exception" keyword. With a CVSS score of 7.5 (High), this vulnerability can be exploited remotely with low attack complexity, leading to a complete denial of service without requiring user interaction or privileges. Currently, there is no evidence of active exploitation, no public exploit code available (Metasploit, Nuclei, ExploitDB), and minimal community discussion or media coverage.

Impacted Technologies

VendorProductVersion(s)CPE
>= 1.5, <= 2.7.3CPE matchmatch criteria
cpe:2.3:a:pygments:pygments:*:*:*:*:*:*:*:*
3.11CPE matchmatch criteria
cpe:2.3:a:redhat:openshift_container_platform:3.11:*:*:*:*:*:*:*
4.0CPE matchmatch criteria
cpe:2.3:a:redhat:openshift_container_platform:4.0:*:*:*:*:*:*:*
10.0CPE matchmatch criteria
cpe:2.3:a:redhat:openstack_platform:10.0:*:*:*:*:*:*:*
Range not provided by sourceCPE matchmatch criteria
cpe:2.3:a:redhat:software_collections:-:*:*:*:*:*:*:*

CVSS Data

CVSS version used by this source: 3.1

7.5HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality Impact
NONE
Integrity Impact
NONE
Availability Impact
HIGH
Exploitability Score
3.9
Impact Score
3.6
CvssVersion
3.1

Exploit Intelligence

EPSS Score
2.76%
Probability of exploitation in next 30 days
EPSS Percentile
84.7%
Percentile rank of EPSS score among Peer Group
As of 2026-07-27
Model: v2026.06.15
This CVE's current EPSS score of 0.0276 is in the 73rd percentile among its peer group of 51,553 CVEs.

Social Chatter

The average CVE in this peer group has 0.0 Twitter, 0.0 Reddit, 0.1 Bluesky, 0.1 Mastodon, and 0.4 GitHub mentions.

Media Mentions

No media coverage found for this CVE.

The average CVE in this peer group has 0.1 InfoSec Media, 0.0 Vendor Blog, and 0.0 Security Researcher mentions.

Remediation

Patch Available

Vendor Patches (38)

microsoftpatch availablevia msrc
Product: azl3 python-pygments 2.7.4-1 on Azure Linux 3.0Fixed in: 2.7.4-1
microsoftpatch availablevia msrc
Product: 19947-17084Fixed in: 2.7.4-1
microsoftpatch availablevia msrc
Product: CBL Mariner 1.0 x64Fixed in: 2.4.2-6
microsoftpatch availablevia msrc
Product: CBL Mariner 1.0 ARMFixed in: 2.4.2-6
microsoftpatch availablevia msrc
Product: CBL Mariner 2.0 x64Fixed in: 2.4.2-7
microsoftpatch availablevia msrc
Product: CBL Mariner 2.0 ARMFixed in: 2.4.2-7
microsoftpatch availablevia msrc
Product: Azure Linux 3.0 x64Fixed in: 2.7.4-1
microsoftpatch availablevia msrc
Product: Azure Linux 3.0 ARMFixed in: 2.7.4-1
microsoftpatch availablevia msrc
Product: 16993-17084Fixed in: 2.7.4-1
microsoftpatch availablevia msrc
Product: azl3 python-pygments 2.5.2-1 on Azure Linux 3.0Fixed in: 2.7.4-1
pippatch availablevia ghsa
Product: PygmentsFixed in: 2.7.4
redhatpatch availablevia redhat_api
Product: Red Hat Automation Hub 4.2 for RHEL 8Fixed in: python-bleach-allowlist-0:1.0.3-1.el8pc
View patch
redhatpatch availablevia redhat_api
Product: Red Hat Automation Hub 4.2 for RHEL 8Fixed in: python-galaxy-importer-0:0.2.15-1.el8pc
View patch
redhatpatch availablevia redhat_api
Product: Red Hat Automation Hub 4.2 for RHEL 8Fixed in: python-galaxy-ng-0:4.2.2-1.el8pc
View patch
redhatpatch availablevia redhat_api
Product: Red Hat Automation Hub 4.2 for RHEL 8Fixed in: python-pulp-ansible-1:0.5.6-1.el8pc
View patch
redhatpatch availablevia redhat_api
Product: Red Hat Enterprise Linux 8Fixed in: python36:3.6-8050020210811103506.982725ab
View patch
redhatpatch availablevia redhat_api
Product: Red Hat Enterprise Linux 8Fixed in: python27:2.7-8050020210811095446.3e7ace8b
View patch
redhatpatch availablevia redhat_api
Product: Red Hat Enterprise Linux 8Fixed in: resource-agents-0:4.1.1-98.el8
View patch
redhatpatch availablevia redhat_api
Product: Red Hat Software Collections for Red Hat Enterprise Linux 7Fixed in: python27-babel-0:0.9.6-10.el7
View patch
redhatpatch availablevia redhat_api
Product: Red Hat Software Collections for Red Hat Enterprise Linux 7Fixed in: python27-python-0:2.7.18-3.el7
View patch
redhatpatch availablevia redhat_api
Product: Red Hat Software Collections for Red Hat Enterprise Linux 7Fixed in: python27-python-jinja2-0:2.6-16.el7
View patch
redhatpatch availablevia redhat_api
Product: Red Hat Software Collections for Red Hat Enterprise Linux 7Fixed in: python27-python-pygments-0:1.5-5.el7
View patch
redhatpatch availablevia redhat_api
Product: Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUSFixed in: python27-babel-0:0.9.6-10.el7
View patch
redhatpatch availablevia redhat_api
Product: Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUSFixed in: python27-python-0:2.7.18-3.el7
View patch
redhatpatch availablevia redhat_api
Product: Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUSFixed in: python27-python-jinja2-0:2.6-16.el7
View patch
redhatpatch availablevia redhat_api
Product: Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUSFixed in: python27-python-pygments-0:1.5-5.el7
View patch
redhatpatch availablevia redhat_api
Product: Red Hat Automation Hub 4.2 for RHEL 8Fixed in: python-bleach-0:3.3.0-1.el8pc
View patch
redhatpatch availablevia redhat_api
Product: Red Hat Automation Hub 4.2 for RHEL 7Fixed in: automation-hub-0:4.2.2-1.el7pc
View patch
redhatpatch availablevia redhat_api
Product: Red Hat Automation Hub 4.2 for RHEL 7Fixed in: python3-django-0:2.2.18-1.el7pc
View patch
redhatpatch availablevia redhat_api
Product: Red Hat Automation Hub 4.2 for RHEL 7Fixed in: python-bleach-0:3.3.0-1.el7pc
View patch
redhatpatch availablevia redhat_api
Product: Red Hat Automation Hub 4.2 for RHEL 7Fixed in: python-bleach-allowlist-0:1.0.3-1.el7pc
View patch
redhatpatch availablevia redhat_api
Product: Red Hat Automation Hub 4.2 for RHEL 7Fixed in: python-galaxy-importer-0:0.2.15-1.el7pc
View patch
redhatpatch availablevia redhat_api
Product: Red Hat Automation Hub 4.2 for RHEL 7Fixed in: python-galaxy-ng-0:4.2.2-1.el7pc
View patch
redhatpatch availablevia redhat_api
Product: Red Hat Automation Hub 4.2 for RHEL 7Fixed in: python-pulp-ansible-1:0.5.6-1.el7pc
View patch
redhatpatch availablevia redhat_api
Product: Red Hat Automation Hub 4.2 for RHEL 8Fixed in: automation-hub-0:4.2.2-1.el8pc
View patch
redhatpatch availablevia redhat_api
Product: Red Hat Automation Hub 4.2 for RHEL 8Fixed in: python3-django-0:2.2.18-1.el8pc
View patch
redhatpatch availablevia nvd_reference
View patch
redhatvendor investigatingvia redhat_api
Product: Red Hat OpenShift Container Platform 3.11Fixed in: google-cloud-sdk

Vendor Advisories (4)

microsoft2024-Sep/CVE-2021-20270

CVE-2021-20270

Sep 10, 2024
pipGHSA-9w8r-397f-prfhhigh

Infinite Loop in Pygments

Apr 20, 2021
microsoft2021-Mar/CVE-2021-20270Important

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.

Mar 9, 2021
redhatCVE-2021-20270Moderate

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

Dec 10, 2020

References

bugzilla.redhat.com / show_bug.cgi
Issue TrackingPatchThird Party Advisory
lists.debian.org / debian-lts-announce/2021/05/msg00003.html
Mailing ListThird Party Advisory
lists.debian.org / debian-lts-announce/2021/05/msg00006.html
Mailing ListThird Party Advisory
debian.org / security/2021/dsa-4889
Third Party Advisory
oracle.com / security-alerts/cpuoct2021.html
Not ApplicableThird Party Advisory