High severity · published Mar 17, 2021
CVE-2021-27291
In pygments 1.1+, fixed in 2.7.4, the lexers used to parse programming languages rely heavily on regular expressions
7.5
CVSS
3.9%
EPSS
No
On KEV
Description
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.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Confidentiality
None
Integrity
None
Availability
High
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)3.9% · higher than 90% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
DL
Debian Linux · Debian
9.0; 10.0 · source: NVD
FE
Fedora · Fedoraproject
32; 33 · source: NVD
PY
Pygments · Pygments
1.1 before 2.7.4 · source: NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2021-27291
CVE.org
https://www.cve.org/CVERecord?id=CVE-2021-27291
Exploit
https://gist.github.com/b-c-ds/b1a2cc0c68a35c57188575eb496de5ce
Patch
https://github.com/pygments/pygments/commit/2e7e8c4a7b318f4032493773732754e418279a14
Mailing List
https://lists.debian.org/debian-lts-announce/2021/03/msg00024.html
Mailing List
https://lists.debian.org/debian-lts-announce/2021/05/msg00003.html
Mailing List
https://lists.debian.org/debian-lts-announce/2021/05/msg00006.html
lists.fedoraproject.org
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/GSJRFHALQ7E3UV4FFMFU2YQ6LUDHAI55/
More from Debian Linux
10.0
CVE-2025-32433
Erlang/OTP SSH Vulnerable to Pre-Authentication RCE
10.0
CVE-2025-24201
Apple Multiple Products WebKit Out-of-Bounds Write Vulnerability
10.0
CVE-2021-44228
Apache Log4j2 JNDI features do not protect against attacker controlled LDAP and other JNDI related endpoints
10.0
CVE-2015-3306
ProFTPD Improper Access Control Vulnerability
9.8
CVE-2026-24061
GNU InetUtils Argument Injection Vulnerability
