---
id: CVE-2026-4539
aliases:
  - GHSA-5239-wwwm-4pmq
  - PYSEC-2026-2987
title: >-
  Pygments has Regular Expression Denial of Service (ReDoS) due to Inefficient
  Regex for GUID Matching
summary: >-
  Pygments has Regular Expression Denial of Service (ReDoS) due to Inefficient
  Regex for GUID Matching
severity: low
cvss: 3.3
cvssVector: 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L'
vendor: pygments
product: pygments
ecosystem: pip
affected:
  - pygments < 2.20.0
patched:
  - pygments 2.20.0
published: '2026-03-22'
updated: '2026-09-10'
sourceUpdated: '2026-09-10T03:50:59.780634752Z'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-5239-wwwm-4pmq'
references:
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-4539'
  - url: 'https://github.com/pygments/pygments/issues/3058'
  - url: 'https://github.com/pygments/pygments/pull/3064'
  - url: >-
      https://github.com/pygments/pygments/commit/24b8aa76c6cd6d70f39c6dd605cce319c98e2ccc
  - url: 'https://github.com/pygments/pygments'
  - url: 'https://github.com/pygments/pygments/releases/tag/2.20.0'
  - url: 'https://vuldb.com/?ctiid.352327'
  - url: 'https://vuldb.com/?id.352327'
  - url: 'https://vuldb.com/?submit.774685'
tags:
  - osv
  - pip
epss: 0.00159
epssPercentile: 0.0431
ingestedAt: '2026-07-13T18:57:52.895Z'
---

## Overview

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.

## Affected packages

- `pygments < 2.20.0`

## Remediation

Upgrade to a patched release:

- `pygments 2.20.0`
