
CVE catalog
CVE-2021-20270
pygments: CVE-2021-20270
- Severity
- High · CVSS 7.5
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Published
- Source
- [NVD] · [CVE record]
- EPSS
- 2.76% · Oct 27, 2026
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.
Vulnerable and fixed packages
Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.
| Distribution | Package | Release | Version | Status |
|---|---|---|---|---|
| Debian | pygments | sid | 2.20.0+dfsg-2 | fixed |
| Debian | pygments | forky | 2.20.0+dfsg-2 | fixed |
| Debian | pygments | trixie | 2.18.0+dfsg-2 | fixed |
| Debian | pygments | bookworm | 2.14.0+dfsg-1 | fixed |
| Debian | mediawiki | sid | 1:1.43.11+dfsg-3 | fixed |
| Debian | mediawiki | forky | 1:1.43.11+dfsg-1 | fixed |
| Debian | mediawiki | trixie | 1:1.43.9+dfsg-1~deb13u1 | fixed |
| Debian | mediawiki | trixie-security | 1:1.43.9+dfsg-1~deb13u1 | fixed |
| Debian | mediawiki | bookworm | 1:1.39.17-1+deb12u2 | fixed |
| Debian | mediawiki | bookworm-security | 1:1.39.17-1+deb12u2 | fixed |
| Alpine | py3-pygments | 3.14 | 2.7.4-r0 | fixed |
| Alpine | py3-pygments | 3.15 | 2.7.4-r0 | fixed |
| Alpine | py3-pygments | 3.16 | 2.7.4-r0 | fixed |
| Alpine | py3-pygments | 3.17 | 2.7.4-r0 | fixed |
| Alpine | py3-pygments | 3.18 | 2.7.4-r0 | fixed |
| Alpine | py3-pygments | 3.19 | 2.7.4-r0 | fixed |
| Alpine | py3-pygments | 3.20 | 2.7.4-r0 | fixed |
| Alpine | py3-pygments | 3.21 | 2.7.4-r0 | fixed |
| Alpine | py3-pygments | 3.22 | 2.7.4-r0 | fixed |
| Alpine | py3-pygments | 3.23 | 2.7.4-r0 | fixed |
| Alpine | py3-pygments | 3.24 | 2.7.4-r0 | fixed |
| Opensuse | python-Pygments | tumbleweed | 2.21.0-1.1 | fixed |
| Ubuntu | pygments | pro | 1.6+dfsg-1 | vulnerable |
| Ubuntu | pygments | pro | 1.6+dfsg-1build1 | vulnerable |
| Ubuntu | pygments | pro | 1.6+dfsg-1ubuntu1 | vulnerable |
| Ubuntu | pygments | pro | 1.6+dfsg-1ubuntu1.1 | vulnerable |
| Ubuntu | pygments | pro | 1.6+dfsg-1ubuntu1.1+esm1 | fixed |
| Ubuntu | pygments | 16.04 | 2.0.1+dfsg-1.1svn1 | vulnerable |
| Ubuntu | pygments | 16.04 | 2.0.1+dfsg-1.1ubuntu1 | vulnerable |
| Ubuntu | pygments | 16.04 | 2.1+dfsg-1 | vulnerable |
| Ubuntu | pygments | 16.04 | 2.1+dfsg-1ubuntu0.1 | fixed |
| Ubuntu | pygments | 18.04 | 2.2.0+dfsg-1 | vulnerable |
| Ubuntu | pygments | 18.04 | 2.2.0+dfsg-1ubuntu0.1 | fixed |
| Ubuntu | pygments | 20.04 | 2.3.1+dfsg-1ubuntu1 | vulnerable |
| Ubuntu | pygments | 20.04 | 2.3.1+dfsg-1ubuntu2 | vulnerable |
| Ubuntu | pygments | 20.04 | 2.3.1+dfsg-1ubuntu2.1 | fixed |
| Suse | python-Pygments | linux enterprise module for package hub 15 sp2 | 2.2.0-4.6.1 | fixed |
| Suse | python-Pygments | linux enterprise module for package hub 15 sp3 | 2.2.0-4.6.1 | fixed |
| Suse | python-Pygments | linux enterprise high performance computing 15-espos | 2.2.0-4.6.1 | fixed |
| Suse | python-Pygments | linux enterprise high performance computing 15-ltss | 2.2.0-4.6.1 | fixed |
| Suse | python-Pygments | linux enterprise server 15-ltss | 2.2.0-4.6.1 | fixed |
| Suse | python-Pygments | linux enterprise server for sap applications 15 | 2.2.0-4.6.1 | fixed |
| Suse | python-Pygments | linux enterprise module for basesystem 15 sp2 | 2.6.1-7.7.1 | fixed |
| Suse | python-Pygments | linux enterprise high performance computing 15 sp1-espos | 2.6.1-7.7.1 | fixed |
| Suse | python-Pygments | linux enterprise high performance computing 15 sp1-ltss | 2.6.1-7.7.1 | fixed |
| Suse | python-Pygments | linux enterprise server 15 sp1-bcl | 2.6.1-7.7.1 | fixed |
| Suse | python-Pygments | linux enterprise server 15 sp1-ltss | 2.6.1-7.7.1 | fixed |
| Suse | python-Pygments | linux enterprise server for sap applications 15 sp1 | 2.6.1-7.7.1 | fixed |
| Suse | python-Pygments | enterprise storage 6 | 2.6.1-7.7.1 | fixed |
| Ubuntu | pygments | pro | 1.6+dfsg-1 | vulnerable |
| Ubuntu | pygments | pro | 1.6+dfsg-1build1 | vulnerable |
| Ubuntu | pygments | pro | 1.6+dfsg-1ubuntu1 | vulnerable |
| Ubuntu | pygments | pro | 1.6+dfsg-1ubuntu1.1 | vulnerable |
| Ubuntu | pygments | pro | 1.6+dfsg-1ubuntu1.1+esm1 | fixed |
| Ubuntu | pygments | 16.04 | 2.0.1+dfsg-1.1svn1 | vulnerable |
| Ubuntu | pygments | 16.04 | 2.0.1+dfsg-1.1ubuntu1 | vulnerable |
| Ubuntu | pygments | 16.04 | 2.1+dfsg-1 | vulnerable |
| Ubuntu | pygments | 16.04 | 2.1+dfsg-1ubuntu0.1 | fixed |
| Ubuntu | pygments | 18.04 | 2.2.0+dfsg-1 | vulnerable |
| Ubuntu | pygments | 18.04 | 2.2.0+dfsg-1ubuntu0.1 | fixed |
| Ubuntu | pygments | 20.04 | 2.3.1+dfsg-1ubuntu1 | vulnerable |
| Ubuntu | pygments | 20.04 | 2.3.1+dfsg-1ubuntu2 | vulnerable |
| Ubuntu | pygments | 20.04 | 2.3.1+dfsg-1ubuntu2.1 | fixed |
| Opensuse | python-Pygments | leap 15.2 | 2.6.1-lp152.5.9.1 | fixed |
Fixed-version evidence
| Distribution | Package | Type | Release | Fixed version | Urgency | Origin | Bugs |
|---|---|---|---|---|---|---|---|
| Debian | pygments | source | sid | 2.7.1+dfsg-2 | not yet assigned | Not reported | [984664] |
| Debian | pygments | source | forky | 2.7.1+dfsg-2 | not yet assigned | Not reported | [984664] |
| Debian | pygments | source | trixie | 2.7.1+dfsg-2 | not yet assigned | Not reported | [984664] |
| Debian | pygments | source | bookworm | 2.7.1+dfsg-2 | not yet assigned | Not reported | [984664] |
| Debian | mediawiki | source | sid | 1:1.35.2-1 | not yet assigned | Not reported | Not reported |
| Debian | mediawiki | source | forky | 1:1.35.2-1 | not yet assigned | Not reported | Not reported |
| Debian | mediawiki | source | trixie | 1:1.35.2-1 | not yet assigned | Not reported | Not reported |
| Debian | mediawiki | source | bookworm | 1:1.35.2-1 | not yet assigned | Not reported | Not reported |
| Alpine | py3-pygments | apk | 3.14 | 2.7.4-r0 | Not reported | ALPINE-CVE-2021-20270 | Not reported |
| Alpine | py3-pygments | apk | 3.15 | 2.7.4-r0 | Not reported | ALPINE-CVE-2021-20270 | Not reported |
| Alpine | py3-pygments | apk | 3.16 | 2.7.4-r0 | Not reported | ALPINE-CVE-2021-20270 | Not reported |
| Alpine | py3-pygments | apk | 3.17 | 2.7.4-r0 | Not reported | ALPINE-CVE-2021-20270 | Not reported |
| Alpine | py3-pygments | apk | 3.18 | 2.7.4-r0 | Not reported | ALPINE-CVE-2021-20270 | Not reported |
| Alpine | py3-pygments | apk | 3.19 | 2.7.4-r0 | Not reported | ALPINE-CVE-2021-20270 | Not reported |
| Alpine | py3-pygments | apk | 3.20 | 2.7.4-r0 | Not reported | ALPINE-CVE-2021-20270 | Not reported |
| Alpine | py3-pygments | apk | 3.21 | 2.7.4-r0 | Not reported | ALPINE-CVE-2021-20270 | Not reported |
| Alpine | py3-pygments | apk | 3.22 | 2.7.4-r0 | Not reported | ALPINE-CVE-2021-20270 | Not reported |
| Alpine | py3-pygments | apk | 3.23 | 2.7.4-r0 | Not reported | ALPINE-CVE-2021-20270 | Not reported |
| Alpine | py3-pygments | apk | 3.24 | 2.7.4-r0 | Not reported | ALPINE-CVE-2021-20270 | Not reported |
| Opensuse | python-Pygments | rpm | tumbleweed | 2.21.0-1.1 | Not reported | OPENSUSE-SU-2026:11568-1 | Not reported |
| Ubuntu | pygments | deb | pro | 1.6+dfsg-1ubuntu1.1+esm1 | Not reported | USN-4897-2 | Not reported |
| Ubuntu | pygments | deb | 16.04 | 2.1+dfsg-1ubuntu0.1 | Not reported | USN-4885-1 | Not reported |
| Ubuntu | pygments | deb | 18.04 | 2.2.0+dfsg-1ubuntu0.1 | Not reported | USN-4885-1 | Not reported |
| Ubuntu | pygments | deb | 20.04 | 2.3.1+dfsg-1ubuntu2.1 | Not reported | USN-4885-1 | Not reported |
| Suse | python-Pygments | rpm | linux enterprise module for package hub 15 sp2 | 2.2.0-4.6.1 | Not reported | SUSE-SU-2021:1500-1 | Not reported |
| Suse | python-Pygments | rpm | linux enterprise module for package hub 15 sp3 | 2.2.0-4.6.1 | Not reported | SUSE-SU-2021:1500-1 | Not reported |
| Suse | python-Pygments | rpm | linux enterprise high performance computing 15-espos | 2.2.0-4.6.1 | Not reported | SUSE-SU-2021:1500-1 | Not reported |
| Suse | python-Pygments | rpm | linux enterprise high performance computing 15-ltss | 2.2.0-4.6.1 | Not reported | SUSE-SU-2021:1500-1 | Not reported |
| Suse | python-Pygments | rpm | linux enterprise server 15-ltss | 2.2.0-4.6.1 | Not reported | SUSE-SU-2021:1500-1 | Not reported |
| Suse | python-Pygments | rpm | linux enterprise server for sap applications 15 | 2.2.0-4.6.1 | Not reported | SUSE-SU-2021:1500-1 | Not reported |
| Suse | python-Pygments | rpm | linux enterprise module for basesystem 15 sp2 | 2.6.1-7.7.1 | Not reported | SUSE-SU-2021:3473-1 | Not reported |
| Suse | python-Pygments | rpm | linux enterprise high performance computing 15 sp1-espos | 2.6.1-7.7.1 | Not reported | SUSE-SU-2021:3473-1 | Not reported |
| Suse | python-Pygments | rpm | linux enterprise high performance computing 15 sp1-ltss | 2.6.1-7.7.1 | Not reported | SUSE-SU-2021:3473-1 | Not reported |
| Suse | python-Pygments | rpm | linux enterprise server 15 sp1-bcl | 2.6.1-7.7.1 | Not reported | SUSE-SU-2021:3473-1 | Not reported |
| Suse | python-Pygments | rpm | linux enterprise server 15 sp1-ltss | 2.6.1-7.7.1 | Not reported | SUSE-SU-2021:3473-1 | Not reported |
| Suse | python-Pygments | rpm | linux enterprise server for sap applications 15 sp1 | 2.6.1-7.7.1 | Not reported | SUSE-SU-2021:3473-1 | Not reported |
| Suse | python-Pygments | rpm | enterprise storage 6 | 2.6.1-7.7.1 | Not reported | SUSE-SU-2021:3473-1 | Not reported |
| Ubuntu | pygments | deb | pro | 1.6+dfsg-1ubuntu1.1+esm1 | Not reported | UBUNTU-CVE-2021-20270 | Not reported |
| Ubuntu | pygments | deb | 16.04 | 2.1+dfsg-1ubuntu0.1 | Not reported | UBUNTU-CVE-2021-20270 | Not reported |
| Ubuntu | pygments | deb | 18.04 | 2.2.0+dfsg-1ubuntu0.1 | Not reported | UBUNTU-CVE-2021-20270 | Not reported |
| Ubuntu | pygments | deb | 20.04 | 2.3.1+dfsg-1ubuntu2.1 | Not reported | UBUNTU-CVE-2021-20270 | Not reported |
| Opensuse | python-Pygments | rpm | leap 15.2 | 2.6.1-lp152.5.9.1 | Not reported | OPENSUSE-SU-2021:1402-1 | Not reported |
OpenFactory catalog packages
Matching against OpenFactory catalog package versions is in progress.
[Debian 12 (Bookworm)]
- [mediawiki]Unknown
Details (4)
1:1.39.17-1+deb12u2· all · bookwormFixed · Fixed:
1:1.35.2-1dsa · mediawiki · debian · bookworm; dsa · mediawiki · debian · 12
1:1.39.17-1+deb12u2· all · bookwormFixed · Fixed:
1:1.35.2-1dsa · mediawiki · debian · bookworm; dsa · mediawiki · debian · 12
1:1.39.17-1+deb12u2· all · bookworm-securityFixed · Fixed:
1:1.35.2-1dsa · mediawiki · debian · bookworm; dsa · mediawiki · debian · 12
1:1.39.17-1+deb12u2· all · bookworm-securityFixed · Fixed:
1:1.35.2-1dsa · mediawiki · debian · bookworm; dsa · mediawiki · debian · 12
- [mediawiki-classes]Unknown
Source package: [mediawiki]
Details (4)
1:1.39.17-1+deb12u2· all · bookwormFixed · Fixed:
1:1.35.2-1dsa · mediawiki · debian · bookworm; dsa · mediawiki · debian · 12
1:1.39.17-1+deb12u2· all · bookwormFixed · Fixed:
1:1.35.2-1dsa · mediawiki · debian · bookworm; dsa · mediawiki · debian · 12
1:1.39.17-1+deb12u2· all · bookworm-securityFixed · Fixed:
1:1.35.2-1dsa · mediawiki · debian · bookworm; dsa · mediawiki · debian · 12
1:1.39.17-1+deb12u2· all · bookworm-securityFixed · Fixed:
1:1.35.2-1dsa · mediawiki · debian · bookworm; dsa · mediawiki · debian · 12
- [python3-pygments]Unknown
Source package: [pygments]
Details (2)
2.14.0+dfsg-1· all · bookwormFixed · Fixed:
2.7.1+dfsg-2dsa · pygments · debian · bookworm; dsa · pygments · debian · 12
2.14.0+dfsg-1· all · bookwormFixed · Fixed:
2.7.1+dfsg-2dsa · pygments · debian · bookworm; dsa · pygments · debian · 12
- [python-pygments-doc]Unknown
Source package: [pygments]
Details (2)
2.14.0+dfsg-1· all · bookwormFixed · Fixed:
2.7.1+dfsg-2dsa · pygments · debian · bookworm; dsa · pygments · debian · 12
2.14.0+dfsg-1· all · bookwormFixed · Fixed:
2.7.1+dfsg-2dsa · pygments · debian · bookworm; dsa · pygments · debian · 12
[Debian 13 (Trixie)]
- [mediawiki]Unknown
Details (4)
1:1.43.9+dfsg-1~deb13u1· all · trixieFixed · Fixed:
1:1.35.2-1dsa · mediawiki · debian · 13
1:1.43.9+dfsg-1~deb13u1· all · trixieFixed · Fixed:
1:1.35.2-1dsa · mediawiki · debian · 13
1:1.43.9+dfsg-1~deb13u1· all · trixie-securityFixed · Fixed:
1:1.35.2-1dsa · mediawiki · debian · 13
1:1.43.9+dfsg-1~deb13u1· all · trixie-securityFixed · Fixed:
1:1.35.2-1dsa · mediawiki · debian · 13
- [mediawiki-classes]Unknown
Source package: [mediawiki]
Details (4)
1:1.43.9+dfsg-1~deb13u1· all · trixieFixed · Fixed:
1:1.35.2-1dsa · mediawiki · debian · 13
1:1.43.9+dfsg-1~deb13u1· all · trixieFixed · Fixed:
1:1.35.2-1dsa · mediawiki · debian · 13
1:1.43.9+dfsg-1~deb13u1· all · trixie-securityFixed · Fixed:
1:1.35.2-1dsa · mediawiki · debian · 13
1:1.43.9+dfsg-1~deb13u1· all · trixie-securityFixed · Fixed:
1:1.35.2-1dsa · mediawiki · debian · 13
- [python3-pygments]Unknown
Source package: [pygments]
Details (2)
2.18.0+dfsg-2· all · trixieFixed · Fixed:
2.7.1+dfsg-2dsa · pygments · debian · 13
2.18.0+dfsg-2· all · trixieFixed · Fixed:
2.7.1+dfsg-2dsa · pygments · debian · 13
- [python-pygments-doc]Unknown
Source package: [pygments]
Details (2)
2.18.0+dfsg-2· all · trixieFixed · Fixed:
2.7.1+dfsg-2dsa · pygments · debian · 13
2.18.0+dfsg-2· all · trixieFixed · Fixed:
2.7.1+dfsg-2dsa · pygments · debian · 13
[openSUSE Tumbleweed]
- [python313-Pygments]Unknown
Source package: [python-Pygments]
Details (1)
2.21.0-1.1· noarch · tumbleweedUnknown · Fixed:
2.21.0-1.1Version impact unknown
dsa · python-Pygments · opensuse · tumbleweed
- [python314-Pygments]Unknown
Source package: [python-Pygments]
Details (1)
2.21.0-1.1· noarch · tumbleweedUnknown · Fixed:
2.21.0-1.1Version impact unknown
dsa · python-Pygments · opensuse · tumbleweed
Observed:
References
- [https://ftp.suse.com/pub/projects/security/csaf/opensuse-su-2026_11568-1.json]
- [https://osv.dev/vulnerability/ALPINE-CVE-2021-20270]
- [https://osv.dev/vulnerability/DEBIAN-CVE-2021-20270]
- [https://osv.dev/vulnerability/DLA-2590-1]
- [https://osv.dev/vulnerability/DLA-2648-1]
- [https://osv.dev/vulnerability/DSA-4870-1]
- [https://osv.dev/vulnerability/DSA-4889-1]
- [https://osv.dev/vulnerability/SUSE-SU-2021:1500-1]
- [https://osv.dev/vulnerability/SUSE-SU-2021:3473-1]
- [https://osv.dev/vulnerability/UBUNTU-CVE-2021-20270]
- [https://osv.dev/vulnerability/USN-4885-1]
- [https://osv.dev/vulnerability/USN-4897-2]
- [https://osv.dev/vulnerability/openSUSE-SU-2021:1402-1]
- [https://osv.dev/vulnerability/openSUSE-SU-2026:11568-1]
- [https://security-tracker.debian.org/tracker/CVE-2021-20270]
- [https://security.access.redhat.com/data/csaf/v2/vex/2021/cve-2021-20270.json]
[Debian Security Tracker] · [FIRST EPSS] · [OSV Package Vulnerability Database] · [Red Hat security advisories and VEX] · [SUSE security advisories and VEX]