VDB
Sign up
LOW3.3

PYSEC-2026-2987

Pygments has Regular Expression Denial of Service (ReDoS) due to Inefficient Regex for GUID Matching

Quick fix

PYSEC-2026-2987 — pygments: upgrade to the fixed version with the command below.

pip install --upgrade 'pygments>=2.20.0'

Details

A security flaw has been discovered in pygments before 2.20.0. The impacted element is the function AdlLexer of the file pygments/lexers/archetype.py. The manipulation results in inefficient regular expression complexity. The attack is only possible with local access. The exploit has been released to the public and may be used for attacks. The project was informed of the problem early through an issue report but has not responded yet.

Are you affected?

Enter the version of the package you're using.

Affected packages

PyPI/pygments
Introduced in: 0Fixed in: 2.20.0
Fixpip install --upgrade 'pygments>=2.20.0'

References