Pygments

Pygments is a syntax highlighting package written in Python.

2.21.0Latest, 17 Aug 2026
1.2BDownloads, last month
0Advisories on the latest
10Advisories, all versions
BSD-2-ClauseLicence
2.2KStars
6.2/10OpenSSF Scorecard

Known advisories

Severity Advisory Fix Published
Pygments has Regular Expression Denial of Service (ReDoS) due to Inefficient Regex for GUID Matching CVE-2026-4539 Fixed in 2.20.0 13 Jul 2026
Low Pygments has Regular Expression Denial of Service (ReDoS) due to Inefficient Regex for GUID Matching CVE-2026-4539 Fixed in 2.20.0 22 Mar 2026
Moderate Pygments vulnerable to ReDoS CVE-2022-40896 Fixed in 2.15.0 19 Jul 2023
PYSEC-2023-117 CVE-2022-40896 Fixed in 2.15.1 19 Jul 2023
Critical Command Injection in Pygments CVE-2015-8557 Fixed in 2.1 17 May 2022
High Infinite Loop in Pygments CVE-2021-20270 Fixed in 2.7.4 20 Apr 2021
High Pygments vulnerable to Regular Expression Denial of Service (ReDoS) CVE-2021-27291 Fixed in 2.7.4 29 Mar 2021
PYSEC-2021-140 CVE-2021-20270 Fixed in 2.7.4 23 Mar 2021
PYSEC-2021-141 CVE-2021-27291 Fixed in 2.7.4 17 Mar 2021
PYSEC-2016-32 CVE-2015-8557 Fixed in 2.1 8 Jan 2016

In the news

On Hacker News

Sources: PyPI, deps.dev (CC BY 4.0), OSV. Last checked 3 Dec 2026.