# CVE-2026-4539: PYSEC-2026-2987 - Pygments has Regular Expression Denial of Service (ReDoS) due to Inefficient Regex for GUID Matching

Source: https://junglewise.ai/threats/cve-2026-4539-pygments-has-regular-expression-denial-of-service-redos-due-to  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-13  
License: CC BY 4.0 with a link back

CVE-2026-4539 · Severity: low · CVSS 3.1 · Published 2026-07-13

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

Technologies: [pygments (PyPI)](https://junglewise.ai/threats/technologies/pygments). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-4539 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-4539 being exploited in the wild.

**How severe is CVE-2026-4539?** Low severity, with a CVSS score of 3.1, published 13 July 2026.

**Which products and versions are affected?** pygments (PyPI) ECOSYSTEM:introduced=0,fixed=2.20.0.

**Is there a fix for CVE-2026-4539?** Yes. pygments (PyPI): upgrade to 2.20.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2026-4539?** Check whether you run pygments (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- pygments (PyPI): upgrade to 2.20.0 or later

  ```sh
  pip install "pygments>=2.20.0"
  ```


## Affected products

- pygments (PyPI) ECOSYSTEM:introduced=0,fixed=2.20.0

## Identifiers

- CVE-2026-4539
- GHSA-5239-wwwm-4pmq
- PYSEC-2026-2987

## Related threats

- [PYSEC-2023-117 - A ReDoS issue was discovered in pygments/lexers/smithy.py in pygments through 2.15.0 via SmithyLexer.](https://junglewise.ai/threats/cve-2022-40896-pygments-vulnerable-to-redos)
- [Infinite Loop in Pygments](https://junglewise.ai/threats/cve-2021-20270-infinite-loop-in-pygments)
- [Pygments vulnerable to Regular Expression Denial of Service (ReDoS)](https://junglewise.ai/threats/cve-2021-27291-pygments-vulnerable-to-regular-expression-denial-of-service-redos)
- [Command Injection in Pygments](https://junglewise.ai/threats/cve-2015-8557-command-injection-in-pygments)
