Vulnerability 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 Score
HIGH
Affected Products
| Vendor | Product | Versions |
|---|---|---|
| Pygments | Pygments | >= 1.1, < 2.7.4 |
| Debian | Debian Linux | 9.0 |
| Fedoraproject | Fedora | 32 |
Related Weaknesses (CWE)
References
- https://gist.github.com/b-c-ds/b1a2cc0c68a35c57188575eb496de5ceExploitThird Party Advisory
- https://github.com/pygments/pygments/commit/2e7e8c4a7b318f4032493773732754e41827PatchThird Party Advisory
- https://lists.debian.org/debian-lts-announce/2021/03/msg00024.htmlMailing ListThird Party Advisory
- https://lists.debian.org/debian-lts-announce/2021/05/msg00003.htmlMailing ListThird Party Advisory
- https://lists.debian.org/debian-lts-announce/2021/05/msg00006.htmlMailing ListThird Party Advisory
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedorapro
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedorapro
- https://www.debian.org/security/2021/dsa-4878Third Party Advisory
- https://www.debian.org/security/2021/dsa-4889Third Party Advisory
- https://gist.github.com/b-c-ds/b1a2cc0c68a35c57188575eb496de5ceExploitThird Party Advisory
- https://github.com/pygments/pygments/commit/2e7e8c4a7b318f4032493773732754e41827PatchThird Party Advisory
- https://lists.debian.org/debian-lts-announce/2021/03/msg00024.htmlMailing ListThird Party Advisory
- https://lists.debian.org/debian-lts-announce/2021/05/msg00003.htmlMailing ListThird Party Advisory
- https://lists.debian.org/debian-lts-announce/2021/05/msg00006.htmlMailing ListThird Party Advisory
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedorapro
FAQ
What is CVE-2021-27291?
CVE-2021-27291 is a vulnerability with a CVSS score of 7.5 (HIGH). 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 an...
How severe is CVE-2021-27291?
CVE-2021-27291 has been rated HIGH with a CVSS base score of 7.5/10. Review the CVSS metrics above for detailed severity breakdown.
Is there a patch for CVE-2021-27291?
Check the references section above for vendor advisories and patch information. Affected products include: Pygments Pygments, Debian Debian Linux, Fedoraproject Fedora.