Vulnerability in Pygments
CVE-2021-27291
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.
Vulnerability class: ReDoS (Regular Expression Denial of Service)
Published · last modified .
CVSS v3 metric
CVSS v3 base score 7.5 (High). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
EPSS exploit prediction
EPSS: 0.039 (90.3th percentile), scored .
Low probability of exploitation in the next 30 days, but still tracked. 90th percentile — 90.3% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.
EPSS over last 30 days · oldest: 0.039 · newest: 0.039 · change: 0.000
Affected products
- Pygments
- Debian Linux — versions 9.0, 10.0
- Fedoraproject Fedora — versions 32, 33
Weakness classification (CWE)
Public proof-of-concept exploits
References
- gist.github.com/b-c-ds/b1a2cc0c68a35c57188575eb496de5ce (Exploit, Third Party Advisory)
- github.com/pygments/pygments/commit/2e7e8c4a7b318f4032493773732754e418279a14 (Patch, Third Party Advisory)
- lists.debian.org/debian-lts-announce/2021/03/msg00024.html (mailing-list, Mailing List, Third Party Advisory)
- www.debian.org/security/2021/dsa-4878 (vendor-advisory, Third Party Advisory)
- www.debian.org/security/2021/dsa-4889 (vendor-advisory, Third Party Advisory)
- lists.debian.org/debian-lts-announce/2021/05/msg00003.html (mailing-list, Mailing List, Third Party Advisory)
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/… (vendor-advisory)
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/… (vendor-advisory)
- lists.debian.org/debian-lts-announce/2021/05/msg00006.html (mailing-list, Mailing List, Third Party Advisory)
Frequently asked questions
- What is CVE-2021-27291?
- CVE-2021-27291 is a high-severity vulnerability in Pygments, classified under Inefficient Regular Expression Complexity. CVSS score: 7.5/10. Published 2021-03-17.
- How severe is CVE-2021-27291?
- High severity. CVSS v3 base score is 7.5 out of 10.
- Is CVE-2021-27291 known to be exploited?
- 6 public proof-of-concept repositories are indexed. Not currently listed in the CISA KEV catalog.