PT-2021-3609 · Pypi+9 · Pygments+9
Ben Caller
·
Published
2021-01-03
·
Updated
2023-08-14
·
CVE-2021-27291
CVSS v4.0
8.7
High
| Vector | AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N |
Name of the Vulnerable Software and Affected Versions
Pygments versions 1.1 through 2.7.3
Description
The issue is related to the use of regular expressions in the Pygments syntax highlighting program. 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.
Recommendations
For Pygments versions 1.1 through 2.7.3, update to version 2.7.4 to resolve the issue.
As a temporary workaround, consider restricting the input to the lexers to minimize the risk of exploitation.
Exploit
Fix
DoS
Resource Exhaustion
Found an issue in the description? Have something to add? Feel free to write us 👾
Related Identifiers
Affected Products
Alt Linux
Almalinux
Astra Linux
Centos
Linuxmint
Pygments
Red Hat
Rocky Linux
Suse
Ubuntu