Skip to main content
VulnerabilityPublished Updated

CVE-2026-4539: pygments · ReDoS

Affects pygmentsSource CVE Database V5

0
Compare

Public exploit available · CVSS 4.8 Medium.

Data as of 30 Oct 2026, 11:52 UTC

CVSS 4.0 base score
4.8Medium
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.1% chance of exploitation in 30 days – higher than 5% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
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

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 22 Mar 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: evidence found.

    CVSS exploit maturity: proof of concept public

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), CVSS vector, the Metasploit, Exploit-DB and nuclei-templates index as of 30 Oct 2026.

What to do

Affected software

ProductAffectedFixed in
pygmentsAffected
  • =2.19.0
  • =2.19.1
  • =2.19.2
Fixed in–
PyPIpygmentspkg:pypi/pygmentsOther threatsAffected
  • =2.19.0
  • =2.19.1
  • =2.19.2
Fixed in–

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

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.

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.

References

Community reviews

Loading reviews…