{"cve":"CVE-2021-27291","nvd":{"published":"2021-03-17T13:15:15.137","modified":"2026-06-17T03:44:37.283","status":"Modified","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_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5},"cwes":["CWE-1333"],"references":["https://gist.github.com/b-c-ds/b1a2cc0c68a35c57188575eb496de5ce","https://github.com/pygments/pygments/commit/2e7e8c4a7b318f4032493773732754e418279a14","https://lists.debian.org/debian-lts-announce/2021/03/msg00024.html","https://lists.debian.org/debian-lts-announce/2021/05/msg00003.html","https://lists.debian.org/debian-lts-announce/2021/05/msg00006.html"],"products":["debian:debian_linux","fedoraproject:fedora","pygments:pygments"],"source":"nvd","synced_at":"2026-10-19T21:15:50.279857260+00:00"},"epss":{"cve":"CVE-2021-27291","score":0.03906,"percentile":0.90282,"date":"2026-11-01"},"kev":null,"osv":[{"id":"GHSA-pq64-v7f5-gqh8","url":"https://osv.dev/vulnerability/GHSA-pq64-v7f5-gqh8","summary":"Pygments vulnerable to Regular Expression Denial of Service (ReDoS)","modified":"2024-10-14T18:40:16.220059Z","packages":[{"ecosystem":"PyPI","name":"pygments","purl":"pkg:pypi/pygments","ranges":[">=1.1 <2.7.4"],"fixed":["2.7.4"]}]},{"id":"PYSEC-2021-141","url":"https://osv.dev/vulnerability/PYSEC-2021-141","summary":"","modified":"2023-11-08T04:05:24.065715Z","packages":[{"ecosystem":"PyPI","name":"pygments","purl":"pkg:pypi/pygments","ranges":[">=1.1 <2.7.4"],"fixed":["2.7.4"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}