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 2. 19. 0 through 2. 19. 2, specifically in the AdlLexer function within 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, and no integrity or confidentiality impact is reported. The vulnerability has a CVSS score of 4. 8, reflecting its moderate risk.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 03/29/2026, 20:06:46 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 vulnerability is located in the AdlLexer function within the archetype.py lexer module. It stems from inefficient regular expression complexity, which can lead to excessive CPU consumption when processing crafted input. This type of flaw is commonly known as a Regular Expression Denial of Service (ReDoS). The attack vector requires local access with limited privileges, meaning an attacker must have some level of access to the host system to trigger the vulnerability. No authentication or user interaction is needed beyond this local access. The vulnerability does not impact confidentiality or integrity but can degrade availability by causing the application or system to become unresponsive or slow due to resource exhaustion. The CVSS 4.0 vector indicates low attack complexity but limited scope and impact, with no privilege escalation or remote exploitation possible. Although the vulnerability was responsibly disclosed early, the pygments project has not yet issued a patch or official response. Publicly available exploit code increases the risk that attackers with local access could leverage this flaw to disrupt services or perform denial of service attacks on systems using pygments for code lexing or highlighting.

Potential Impact

The primary impact of CVE-2026-4539 is on system availability. An attacker with local access and limited privileges can exploit inefficient regular expression processing to cause high CPU usage, potentially leading to denial of service conditions. This can disrupt applications or services that rely on pygments for syntax highlighting or code analysis, especially if they process untrusted or user-supplied input. While the vulnerability does not compromise confidentiality or integrity, the resulting service degradation can affect developer productivity, automated tooling, or any systems embedding pygments. Organizations with multi-user environments or shared systems where local users have access to run code or commands involving pygments are at higher risk. The lack of a patch and the public availability of exploit code increase the likelihood of exploitation in such environments. However, the requirement for local access limits the threat to internal or compromised hosts rather than remote attackers. Overall, the impact is moderate but could be significant in environments where availability is critical and local user access is common.

Mitigation Recommendations

To mitigate CVE-2026-4539, organizations should first restrict local access to trusted users only, minimizing the risk of exploitation by unprivileged local attackers. Until an official patch is released, consider implementing input validation or sanitization to limit or reject inputs that could trigger complex regular expression processing in the AdlLexer function. Monitoring system resource usage for unusual CPU spikes during pygments execution can help detect exploitation attempts. If feasible, isolate or sandbox processes using pygments to contain potential denial of service impacts. Organizations may also evaluate alternative syntax highlighting libraries without this vulnerability or downgrade to earlier unaffected versions if applicable. Engage with the pygments project or community to track patch releases and apply updates promptly once available. Additionally, review internal policies on local user permissions and code execution rights to reduce exposure. Finally, educate developers and system administrators about the risk of ReDoS vulnerabilities and the importance of cautious handling of untrusted input in code analysis tools.

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/29/2026, 8:06:46 PM

Last updated: 5/7/2026, 4:58:30 AM

Views: 449

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