Description
A security flaw has been discovered in pygments up to 2.19.2. 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.
Published: 2026-03-22
Score: 4.8 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Denial of Service (Resource Exhaustion)
Action: Upgrade
AI Analysis

Impact

A regular expression in Pygments’ AdlLexer can be engineered to consume excessive processing time, causing the application that processes the input to hang or crash. The vulnerability results in uncontrolled resource consumption, which degrades or halts service availability. It does not lead to data disclosure, tampering, or privilege escalation.

Affected Systems

Pygments versions up to and including 2.19.2 are affected. The library is an open‑source Python package that can be imported by any project. Any environment that utilizes the AdlLexer in its tokenization process is at risk, regardless of vendor distribution.

Risk and Exploitability

The CVSS score of 4.8 indicates moderate severity, and no EPSS score is available. The issue is not listed in the CISA KEV catalog. Exploitation requires local access to an application that imports Pygments, so the attack vector is local. The public exploit demonstrates that a malicious input can trigger the denial‑of‑service condition, but it does not compromise confidentiality or integrity.

Generated by OpenCVE AI on March 22, 2026 at 07:50 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Check the Pygments project page or PyPI for a patched release and upgrade to a version that addresses the AdlLexer regular‑expression flaw.
  • If a patched release is not yet available, restrict the use of AdlLexer to only trusted inputs or disable its use entirely in the application.
  • Monitor the project's issue tracker and security advisories for updates and apply any new patches promptly.

Generated by OpenCVE AI on March 22, 2026 at 07:50 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-5239-wwwm-4pmq Pygments has Regular Expression Denial of Service (ReDoS) due to Inefficient Regex for GUID Matching
History

Mon, 23 Mar 2026 17:15:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Mon, 23 Mar 2026 12:15:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Low


Mon, 23 Mar 2026 10:00:00 +0000

Type Values Removed Values Added
First Time appeared Pygments
Pygments pygments
Vendors & Products Pygments
Pygments pygments

Sun, 22 Mar 2026 06:00:00 +0000

Type Values Removed Values Added
Description A security flaw has been discovered in pygments up to 2.19.2. 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.
Title pygments archetype.py AdlLexer redos
Weaknesses CWE-1333
CWE-400
References
Metrics cvssV2_0

{'score': 1.7, 'vector': 'AV:L/AC:L/Au:S/C:N/I:N/A:P/E:POC/RL:ND/RC:UR'}

cvssV3_0

{'score': 3.3, 'vector': 'CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L/E:P/RL:X/RC:R'}

cvssV3_1

{'score': 3.3, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L/E:P/RL:X/RC:R'}

cvssV4_0

{'score': 4.8, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:P'}


Subscriptions

Pygments Pygments
cve-icon MITRE

Status: PUBLISHED

Assigner: VulDB

Published:

Updated: 2026-03-23T16:08:49.809Z

Reserved: 2026-03-21T09:10:23.929Z

Link: CVE-2026-4539

cve-icon Vulnrichment

Updated: 2026-03-23T16:08:43.157Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-03-22T06:16:20.913

Modified: 2026-03-23T14:31:37.267

Link: CVE-2026-4539

cve-icon Redhat

Severity : Low

Publid Date: 2026-03-22T05:35:12Z

Links: CVE-2026-4539 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-03-25T14:46:37Z

Weaknesses