Pygments vulnerable to Regular Expression Denial of Service (ReDoS)
High severity
GitHub Reviewed
Published
Mar 29, 2021
to the GitHub Advisory Database
•
Updated Oct 14, 2024
Description
Published by the National Vulnerability Database
Mar 17, 2021
Reviewed
Mar 22, 2021
Published to the GitHub Advisory Database
Mar 29, 2021
Last updated
Oct 14, 2024
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.
References