Advisory

PYSEC-2026-2987

Also known as: CVE-2026-4539, GHSA-5239-wwwm-4pmq

Summary

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

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.

Severity

Low Basis: CVSS v3 score 3.3, vector CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L

Dates

Published
2026-07-13 14:36 UTC
Modified
2026-07-13 16:32 UTC

Affected packages and fixes

pygments

PyPI · All systems

Affected

  • introduced 0, fixed 2.20.0 (ecosystem)

Fixed versions

2.20.0

Fix

  • Fixed version 2.20.0
    pip install --upgrade pygments==2.20.0

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: PyPA Advisory Database · CC BY 4.0

Sources & licences