{"api_version":"1","generated_at":"2026-04-22T21:02:46+00:00","cve":"CVE-2021-27291","urls":{"html":"https://cve.report/CVE-2021-27291","api":"https://cve.report/api/cve/CVE-2021-27291.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2021-27291","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2021-27291"},"summary":{"title":"CVE-2021-27291","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.","state":"PUBLIC","assigner":"cve@mitre.org","published_at":"2021-03-17 13:15:00","updated_at":"2023-11-07 03:31:00"},"problem_types":["CWE-1333"],"metrics":[],"references":[{"url":"https://lists.debian.org/debian-lts-announce/2021/05/msg00003.html","name":"[debian-lts-announce] 20210505 [SECURITY] [DLA 2648-1] mediawiki security update","refsource":"MLIST","tags":[],"title":"[SECURITY] [DLA 2648-1] mediawiki security update","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/pygments/pygments/commit/2e7e8c4a7b318f4032493773732754e418279a14","name":"https://github.com/pygments/pygments/commit/2e7e8c4a7b318f4032493773732754e418279a14","refsource":"MISC","tags":[],"title":"Fix several exponential/cubic complexity regexes found by Ben Caller/… · pygments/pygments@2e7e8c4 · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://www.debian.org/security/2021/dsa-4878","name":"DSA-4878","refsource":"DEBIAN","tags":[],"title":"Debian -- Security Information -- DSA-4878-1 pygments","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/WSLD67LFGXOX2K5YNESSWAS4AGZIJTUQ/","name":"FEDORA-2021-3f975f68c8","refsource":"","tags":[],"title":"[SECURITY] Fedora 33 Update: python-pygments-2.6.1-6.fc33 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/GSJRFHALQ7E3UV4FFMFU2YQ6LUDHAI55/","name":"FEDORA-2021-166dfc62b2","refsource":"FEDORA","tags":[],"title":"[SECURITY] Fedora 32 Update: python-pygments-2.4.2-9.fc32 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://gist.github.com/b-c-ds/b1a2cc0c68a35c57188575eb496de5ce","name":"https://gist.github.com/b-c-ds/b1a2cc0c68a35c57188575eb496de5ce","refsource":"MISC","tags":[],"title":"cve-2021-27291 · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"0"},{"url":"https://lists.debian.org/debian-lts-announce/2021/05/msg00006.html","name":"[debian-lts-announce] 20210506 [SECURITY] [DLA 2648-2] mediawiki regression update","refsource":"MLIST","tags":[],"title":"[SECURITY] [DLA 2648-2] mediawiki regression update","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/WSLD67LFGXOX2K5YNESSWAS4AGZIJTUQ/","name":"FEDORA-2021-3f975f68c8","refsource":"FEDORA","tags":[],"title":"[SECURITY] Fedora 33 Update: python-pygments-2.6.1-6.fc33 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/GSJRFHALQ7E3UV4FFMFU2YQ6LUDHAI55/","name":"FEDORA-2021-166dfc62b2","refsource":"","tags":[],"title":"[SECURITY] Fedora 32 Update: python-pygments-2.4.2-9.fc32 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://www.debian.org/security/2021/dsa-4889","name":"DSA-4889","refsource":"DEBIAN","tags":[],"title":"Debian -- Security Information -- DSA-4889-1 mediawiki","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://lists.debian.org/debian-lts-announce/2021/03/msg00024.html","name":"[debian-lts-announce] 20210319 [SECURITY] [DLA 2600-1] pygments security update","refsource":"MLIST","tags":[],"title":"[SECURITY] [DLA 2600-1] pygments security update","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-27291","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-27291","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2021","cve_id":"27291","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"debian","cpe5":"debian_linux","cpe6":"10.0","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2021","cve_id":"27291","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"debian","cpe5":"debian_linux","cpe6":"9.0","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2021","cve_id":"27291","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"fedoraproject","cpe5":"fedora","cpe6":"32","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2021","cve_id":"27291","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"fedoraproject","cpe5":"fedora","cpe6":"33","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2021","cve_id":"27291","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"pygments","cpe5":"pygments","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[{"cve":"CVE-2021-27291","qid":"159462","title":"Oracle Enterprise Linux Security Update for python36:3.6 (ELSA-2021-4150)"},{"cve":"CVE-2021-27291","qid":"159463","title":"Oracle Enterprise Linux Security Update for python27:2.7 (ELSA-2021-4151)"},{"cve":"CVE-2021-27291","qid":"159560","title":"Oracle Enterprise Linux Security Update for resource-agents (ELSA-2021-9553)"},{"cve":"CVE-2021-27291","qid":"178487","title":"Debian Security Update for pygments (DLA 2600-1)"},{"cve":"CVE-2021-27291","qid":"178489","title":"Debian Security Update for pygments (DSA 4878-1)"},{"cve":"CVE-2021-27291","qid":"178531","title":"Debian Security Update for mediawiki (DSA 4889-1)"},{"cve":"CVE-2021-27291","qid":"178584","title":"Debian Security Update for mediawiki (DLA 2648-2)"},{"cve":"CVE-2021-27291","qid":"178613","title":"Debian Security Update for mediawiki (DLA 2648-1)"},{"cve":"CVE-2021-27291","qid":"179545","title":"Debian Security Update for mediawikipygments (CVE-2021-27291)"},{"cve":"CVE-2021-27291","qid":"198315","title":"Ubuntu Security Notification for Pygments Vulnerability (USN-4897-1)"},{"cve":"CVE-2021-27291","qid":"199654","title":"Ubuntu Security Notification for Pygments Vulnerabilities (USN-4897-2)"},{"cve":"CVE-2021-27291","qid":"239582","title":"Red Hat Update for python27 (RHSA-2021:3252)"},{"cve":"CVE-2021-27291","qid":"239798","title":"Red Hat Update for resource-agents security (RHSA-2021:4139)"},{"cve":"CVE-2021-27291","qid":"239809","title":"Red Hat Update for python36:3.6 (RHSA-2021:4150)"},{"cve":"CVE-2021-27291","qid":"239826","title":"Red Hat Update for python27:2.7 (RHSA-2021:4151)"},{"cve":"CVE-2021-27291","qid":"281245","title":"Fedora Security Update for python (FEDORA-2021-3f975f68c8)"},{"cve":"CVE-2021-27291","qid":"281246","title":"Fedora Security Update for python (FEDORA-2021-166dfc62b2)"},{"cve":"CVE-2021-27291","qid":"296053","title":"Oracle Solaris 11.4 Support Repository Update (SRU) 35.94.4 Missing (CPUJUL2021)"},{"cve":"CVE-2021-27291","qid":"355592","title":"Amazon Linux Security Advisory for python3-pygments : ALAS2-2023-2117"},{"cve":"CVE-2021-27291","qid":"355791","title":"Amazon Linux Security Advisory for python-pygments : ALAS2-2023-2198"},{"cve":"CVE-2021-27291","qid":"501172","title":"Alpine Linux Security Update for py3-pygments"},{"cve":"CVE-2021-27291","qid":"670235","title":"EulerOS Security Update for python-pygments (EulerOS-SA-2021-1841)"},{"cve":"CVE-2021-27291","qid":"670337","title":"EulerOS Security Update for python-pygments (EulerOS-SA-2021-1887)"},{"cve":"CVE-2021-27291","qid":"670435","title":"EulerOS Security Update for python-pygments (EulerOS-SA-2021-2065)"},{"cve":"CVE-2021-27291","qid":"670446","title":"EulerOS Security Update for python-pygments (EulerOS-SA-2021-2054)"},{"cve":"CVE-2021-27291","qid":"670471","title":"EulerOS Security Update for python-pygments (EulerOS-SA-2021-2228)"},{"cve":"CVE-2021-27291","qid":"670683","title":"EulerOS Security Update for python-pygments (EulerOS-SA-2021-2441)"},{"cve":"CVE-2021-27291","qid":"751412","title":"SUSE Enterprise Linux Security Update for python-Pygments (SUSE-SU-2021:3841-1)"},{"cve":"CVE-2021-27291","qid":"751415","title":"SUSE Enterprise Linux Security Update for python-Pygments (SUSE-SU-2021:3840-1)"},{"cve":"CVE-2021-27291","qid":"751428","title":"OpenSUSE Security Update for python-Pygments (openSUSE-SU-2021:3841-1)"},{"cve":"CVE-2021-27291","qid":"751429","title":"OpenSUSE Security Update for python-Pygments (openSUSE-SU-2021:3839-1)"},{"cve":"CVE-2021-27291","qid":"751444","title":"OpenSUSE Security Update for python-Pygments (openSUSE-SU-2021:1521-1)"},{"cve":"CVE-2021-27291","qid":"900162","title":"CBL-Mariner Linux Security Update for python-pygments 2.4.2"},{"cve":"CVE-2021-27291","qid":"901938","title":"Common Base Linux Mariner (CBL-Mariner) Security Update for python-pygments (6812-1)"},{"cve":"CVE-2021-27291","qid":"903080","title":"Common Base Linux Mariner (CBL-Mariner) Security Update for python-pygments (3982)"},{"cve":"CVE-2021-27291","qid":"940186","title":"AlmaLinux Security Update for resource-agents (ALSA-2021:4139)"},{"cve":"CVE-2021-27291","qid":"940522","title":"AlmaLinux Security Update for python27:2.7 (ALSA-2021:4151)"},{"cve":"CVE-2021-27291","qid":"940566","title":"AlmaLinux Security Update for python36:3.6 (ALSA-2021:4150)"},{"cve":"CVE-2021-27291","qid":"960320","title":"Rocky Linux Security Update for python27:2.7 (RLSA-2021:4151)"},{"cve":"CVE-2021-27291","qid":"960392","title":"Rocky Linux Security Update for python36:3.6 (RLSA-2021:4150)"},{"cve":"CVE-2021-27291","qid":"960815","title":"Rocky Linux Security Update for resource-agents (RLSA-2021:4139)"},{"cve":"CVE-2021-27291","qid":"982634","title":"Python (pip) Security Update for Pygments (GHSA-pq64-v7f5-gqh8)"}]},"source_records":{"cve_program":{"CVE_data_meta":{"ASSIGNER":"cve@mitre.org","ID":"CVE-2021-27291","STATE":"PUBLIC"},"affects":{"vendor":{"vendor_data":[{"product":{"product_data":[{"product_name":"n/a","version":{"version_data":[{"version_value":"n/a"}]}}]},"vendor_name":"n/a"}]}},"data_format":"MITRE","data_type":"CVE","data_version":"4.0","description":{"description_data":[{"lang":"eng","value":"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."}]},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"n/a"}]}]},"references":{"reference_data":[{"refsource":"MISC","name":"https://gist.github.com/b-c-ds/b1a2cc0c68a35c57188575eb496de5ce","url":"https://gist.github.com/b-c-ds/b1a2cc0c68a35c57188575eb496de5ce"},{"refsource":"MISC","name":"https://github.com/pygments/pygments/commit/2e7e8c4a7b318f4032493773732754e418279a14","url":"https://github.com/pygments/pygments/commit/2e7e8c4a7b318f4032493773732754e418279a14"},{"refsource":"MLIST","name":"[debian-lts-announce] 20210319 [SECURITY] [DLA 2600-1] pygments security update","url":"https://lists.debian.org/debian-lts-announce/2021/03/msg00024.html"},{"refsource":"DEBIAN","name":"DSA-4878","url":"https://www.debian.org/security/2021/dsa-4878"},{"refsource":"DEBIAN","name":"DSA-4889","url":"https://www.debian.org/security/2021/dsa-4889"},{"refsource":"MLIST","name":"[debian-lts-announce] 20210505 [SECURITY] [DLA 2648-1] mediawiki security update","url":"https://lists.debian.org/debian-lts-announce/2021/05/msg00003.html"},{"refsource":"FEDORA","name":"FEDORA-2021-166dfc62b2","url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/GSJRFHALQ7E3UV4FFMFU2YQ6LUDHAI55/"},{"refsource":"FEDORA","name":"FEDORA-2021-3f975f68c8","url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/WSLD67LFGXOX2K5YNESSWAS4AGZIJTUQ/"},{"refsource":"MLIST","name":"[debian-lts-announce] 20210506 [SECURITY] [DLA 2648-2] mediawiki regression update","url":"https://lists.debian.org/debian-lts-announce/2021/05/msg00006.html"}]}},"nvd":{"publishedDate":"2021-03-17 13:15:00","lastModifiedDate":"2023-11-07 03:31:00","problem_types":["CWE-1333"],"metrics":{"baseMetricV3":{"cvssV3":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"NONE","availabilityImpact":"HIGH","baseScore":7.5,"baseSeverity":"HIGH"},"exploitabilityScore":3.9,"impactScore":3.6},"baseMetricV2":{"cvssV2":{"version":"2.0","vectorString":"AV:N/AC:L/Au:N/C:N/I:N/A:P","accessVector":"NETWORK","accessComplexity":"LOW","authentication":"NONE","confidentialityImpact":"NONE","integrityImpact":"NONE","availabilityImpact":"PARTIAL","baseScore":5},"severity":"MEDIUM","exploitabilityScore":10,"impactScore":2.9,"acInsufInfo":false,"obtainAllPrivilege":false,"obtainUserPrivilege":false,"obtainOtherPrivilege":false,"userInteractionRequired":false}},"configurations":{"CVE_data_version":"4.0","nodes":[{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:pygments:pygments:*:*:*:*:*:*:*:*","versionStartIncluding":"1.1","versionEndExcluding":"2.7.4","cpe_name":[]}]},{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*","cpe_name":[]},{"vulnerable":true,"cpe23Uri":"cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*","cpe_name":[]}]},{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:o:fedoraproject:fedora:32:*:*:*:*:*:*:*","cpe_name":[]},{"vulnerable":true,"cpe23Uri":"cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:*","cpe_name":[]}]}]}},"legacy_mitre":{"record":{"CveYear":"2021","CveId":"27291","Ordinal":"202382","Title":"CVE-2021-27291","CVE":"CVE-2021-27291","Year":"2021"},"notes":[{"CveYear":"2021","CveId":"27291","Ordinal":"1","NoteData":"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.","Type":"Description","Title":null},{"CveYear":"2021","CveId":"27291","Ordinal":"2","NoteData":"2021-03-17","Type":"Other","Title":"Published"},{"CveYear":"2021","CveId":"27291","Ordinal":"3","NoteData":"2021-05-06","Type":"Other","Title":"Modified"}]}}}