Skip to content

pygments (PyPI)

Pygments is a generic syntax highlighter written in Python

Advisories
11
Latest version
2.21.0
Released Aug 17, 2026
License
BSD-2-Clause
OpenSSF Scorecard
6.2 / 10

How to fix

Upgrading to 2.20.0 or later clears every advisory below that has a fix.

Upgrade commands
pip
pip install --upgrade "pygments>=2.21.0"
poetry
poetry add "pygments>=2.21.0"
uv
uv add "pygments>=2.21.0"

Known vulnerabilities

AdvisorySeverityAffectedFixed in
GHSA-5239-wwwm-4pmq
Pygments has Regular Expression Denial of Service (ReDoS) due to Inefficient Regex for GUID Matching
Low
EPSS 0.16%
< 2.20.0
2.20.0
GHSA-5239-wwwm-4pmq
Pygments has Regular Expression Denial of Service (ReDoS) due to Inefficient Regex for GUID Matching
Low
EPSS 0.16%
< 2.20.0
2.20.0
GHSA-5239-wwwm-4pmq
Pygments has Regular Expression Denial of Service (ReDoS) due to Inefficient Regex for GUID Matching
Low
EPSS 0.16%
< 2.20.0
2.20.0
GHSA-mrwq-x4v8-fh7p
Pygments vulnerable to ReDoS
Medium
EPSS 0.52%
< 2.15.0
2.15.0
GHSA-mrwq-x4v8-fh7p
Pygments vulnerable to ReDoS
Medium
EPSS 0.52%
< 2.15.1
2.15.1
GHSA-9w8r-397f-prfh
Infinite Loop in Pygments
High
EPSS 2.76%
>= 1.5, < 2.7.4
2.7.4
GHSA-9w8r-397f-prfh
Infinite Loop in Pygments
High
EPSS 2.76%
>= 1.5, < 2.7.4
2.7.4
GHSA-pq64-v7f5-gqh8
Pygments vulnerable to Regular Expression Denial of Service (ReDoS)
High
EPSS 3.91%
>= 1.1, < 2.7.4
2.7.4
GHSA-pq64-v7f5-gqh8
Pygments vulnerable to Regular Expression Denial of Service (ReDoS)
High
EPSS 3.91%
>= 1.1, < 2.7.4
2.7.4
GHSA-fff8-4w9p-7v76
Command Injection in Pygments
Critical
EPSS 6.72%
>= 1.2.2, < 2.1
2.1
GHSA-fff8-4w9p-7v76
Command Injection in Pygments
Critical
EPSS 6.72%
>= 1.2.2, < 2.1
2.1

Source: https://github.com/pygments/pygments

Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor