Vulnerability Database · PyPI · pygments · Version
pygments 2.7.1
2.7.1 is affected by 8 vulnerabilities.
The vulnerabilities that cover this exact version are listed below with the fixed version to move to. The upgrade Vulert recommends: 2.21.0.
Critical 0 High 2 Medium 1 Low 2 Unrated 3
-
Released 17 Sep 2020
Licence non-standard
Also known from other sources 8
Newer releases 69
Database updated 23/Oct/2026
Release and licence data published by PyPI. Licence information is not legal advice.
Concerned about your application's security?
Vulert continues monitoring your dependencies and alerts you when new vulnerabilities are disclosed. No installation and no source-code access required.
01 Vulnerabilities affecting this version
pygments 2.7.1 vulnerabilities
8 vulnerabilities cover pygments 2.7.1. Open the full list in the database.
| Vulnerability | Severity | Fixed version | Disclosed |
|---|---|---|---|
| CVE-2021-20270: Infinite Loop in Pygments | 7.5 high | 2.7.4 | 20 Apr 2021 |
| CVE-2021-27291: Pygments Regular Expression Denial of Service (ReDoS) | 7.5 high | 2.7.4 | 29 Mar 2021 |
| CVE-2022-40896: Pygments ReDoS Vulnerability | 5.5 medium | 2.15.0 | 19 Jul 2023 |
| CVE-2026-4539: Pygments Regular Expression Denial of Service (ReDoS) Vulnerability | 3.3 low | 2.20.0 | 13 Jul 2026 |
| CVE-2026-4539: Pygments Regular Expression Denial of Service (ReDoS) Vulnerability | 3.3 low | No fix published | 22 Mar 2026 |
| CVE-2022-40896: ReDoS vulnerability in pygments | N/A unrated | 2.15.1 | 19 Jul 2023 |
| CVE-2021-20270: Pygments - Denial of Service via Infinite Loop in SMLLexer | N/A unrated | 2.7.4 | 23 Mar 2021 |
| CVE-2021-27291: pygments - Regular Expression Denial of Service (ReDoS) | N/A unrated | 2e7e8c4a7b318f4032493773732754e418279a14 | 17 Mar 2021 |
Looking for another version, or everything Vulert holds for pygments?
Questions
About pygments 2.7.1
Is pygments 2.7.1 vulnerable?
Yes. 8 vulnerabilities in the Vulert database cover pygments 2.7.1: 0 critical, 2 high, 1 medium and 2 low, plus 3 not yet rated. The upgrade Vulert recommends is 2.21.0, and each entry above names the fixed version to move to.
Which version of pygments should I use instead of 2.7.1?
2.21.0 is the version Vulert recommends for this release line. The version table on the package page lists every release with the vulnerabilities recorded against it.
Is 2.7.1 the latest release of pygments?
No. 2.7.1 was published 17 Sep 2020, and newer releases exist. Newer is not automatically safer — the version table on the package page shows what each release carries.
How do I monitor pygments for upcoming vulnerabilities?
Upload the manifest or SBOM for your application at vulert.com/scanner and Vulert keeps checking the pygments version you actually run against new disclosures, then alerts you when one affects it. There is no installation and no source-code access required.