GitHub Advisoryadvisory · PyPI

GHSA-5239-wwwm-4pmq Pygments has Regular Expression Denial of Service (ReDoS) due to Inefficient Regex for GUID Matching

LOW Published 2026-03-22 Modified 2026-03-30 Official page ↗
Aliases
CVE-2026-4539
Ecosystem
PyPI
Packages
Pygments
Severity
Low
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L
Weaknesses
CWE-1333, CWE-400
Reviewed
2026-03-24

Affected packages

• PyPI Pygments: < 2.20.0 → fixed in 2.20.0

Description

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.

Related

Alias · CVE (1)

  • CVE-2026-4539 A security flaw has been discovered in pygments up to 2.19.2. vulnerability

Weakness · CWE (2)

  • CWE-1333 Inefficient Regular Expression Complexity weakness
  • CWE-400 Uncontrolled Resource Consumption weakness

References