CVE-2021-27291

published 17 Mar 2021 · updated 18 Feb 2026

In pygments 1.1+ fixed in 2.7.4 the lexers used to parse programming languages rely heavily on regular expressions. Some of the regular expressions have exponential or cubic worst-case complexity and are vulnerable to ReDoS. By crafting malicious input an attacker can cause a denial of service.

7.5HighCVSS 7.5EPSS 4%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 4%. No fixed version is recorded.

In pygments 1.1+, fixed in 2.7.4, the lexers used to parse programming languages rely heavily on regular expressions. Some of the regular expressions have exponential or cubic worst-case complexity and are vulnerable to ReDoS. By crafting malicious input, an attacker can cause a denial of service.

Timeline

Every event on this vulnerability

Embed

A live severity badge for an advisory, README or ticket

CVE-2021-27291 severity on Zeptric[![CVE-2021-27291](https://zeptric.io/badge/cve/CVE-2021-27291.svg)](https://zeptric.io/cve/CVE-2021-27291)