Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-4539: Inefficient Regular Expression Complexity in pygments

0
Medium
VulnerabilityCVE-2026-4539cvecve-2026-4539
Published: Sun Mar 22 2026 (03/22/2026, 05:35:12 UTC)
Source: CVE Database V5
Product: pygments

Description

CVE-2026-4539 is a medium severity vulnerability in the pygments library versions up to 2. 19. 2, specifically in the AdlLexer function of pygments/lexers/archetype. py. The flaw arises from inefficient regular expression complexity, which can be exploited locally by an attacker with limited privileges to cause performance degradation or denial of service. No user interaction or authentication beyond local access is required. Although the vulnerability has a CVSS score of 4. 8, indicating moderate risk, no public exploit is known to be actively used in the wild. The pygments project has been notified but has not yet issued a patch. Organizations using pygments in environments where local users can submit or process untrusted input should be cautious and monitor for updates.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 03/22/2026, 06:15:53 UTC

Technical Analysis

CVE-2026-4539 identifies a vulnerability in the pygments syntax highlighting library, affecting versions 2.19.0 through 2.19.2. The issue is located in the AdlLexer function within the archetype.py lexer file, where inefficient regular expression handling leads to excessive computational complexity. This inefficiency can be triggered by crafted input, causing the regular expression engine to consume disproportionate CPU resources, effectively resulting in a denial-of-service (DoS) condition. The attack vector requires local access with limited privileges, meaning an attacker must have the ability to run code or submit input locally to the vulnerable system. No authentication or user interaction is necessary beyond local access. The vulnerability was responsibly disclosed to the pygments maintainers, but as of the publication date, no patch or fix has been released. The CVSS 4.8 score reflects a medium severity, primarily due to the local access requirement and limited impact scope. The flaw does not affect confidentiality or integrity but impacts availability by enabling resource exhaustion. No known exploits are currently observed in the wild, but the public disclosure of the exploit code increases the risk of future attacks. Pygments is widely used in developer tools, documentation generators, and web applications for syntax highlighting, so environments that process untrusted code snippets or text locally are at risk.

Potential Impact

The primary impact of CVE-2026-4539 is a denial-of-service condition caused by resource exhaustion due to inefficient regular expression processing. Organizations that use pygments in local environments where untrusted users can submit input—such as developer workstations, continuous integration systems, or local code analysis tools—may experience degraded performance or service interruptions. Although the vulnerability does not allow remote exploitation, insider threats or compromised local accounts could leverage this flaw to disrupt operations. The impact on confidentiality and integrity is negligible, but availability degradation can affect developer productivity and automated workflows. Since pygments is integrated into many software development and documentation tools worldwide, the vulnerability could have widespread but localized effects. The lack of an official patch increases the window of exposure, and public exploit availability raises the likelihood of opportunistic attacks in environments where local access is possible.

Mitigation Recommendations

To mitigate CVE-2026-4539, organizations should first restrict local access to systems running vulnerable pygments versions, ensuring that only trusted users can execute or submit input to affected components. Implement strict access controls and monitor local user activities for unusual resource usage patterns indicative of exploitation attempts. Where possible, isolate pygments usage in sandboxed or containerized environments to limit the impact of potential DoS conditions. Developers and administrators should track pygments project updates closely and apply patches promptly once available. As an immediate workaround, consider disabling or replacing the AdlLexer functionality if feasible, or use alternative syntax highlighting tools that do not exhibit this vulnerability. Additionally, review and harden input validation and sanitization processes to reduce the risk of malicious input triggering the inefficient regex. Employ resource limits (e.g., CPU time, memory) on processes invoking pygments to prevent excessive resource consumption. Finally, maintain updated incident response plans to quickly address any exploitation attempts.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
VulDB
Date Reserved
2026-03-21T09:10:23.929Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 69bf85b4f4197a8e3b50f1d8

Added to database: 3/22/2026, 6:01:24 AM

Last enriched: 3/22/2026, 6:15:53 AM

Last updated: 3/22/2026, 7:12:08 AM

Views: 4

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses