{"id":"ALPINE-CVE-2021-27291","details":"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.","modified":"2026-03-09T01:19:55.331538Z","published":"2021-03-17T13:15:15.137Z","upstream":["CVE-2021-27291"],"references":[{"type":"ADVISORY","url":"https://security.alpinelinux.org/vuln/CVE-2021-27291"}],"affected":[{"package":{"name":"py3-pygments","ecosystem":"Alpine:v3.11","purl":"pkg:apk/alpine/py3-pygments?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.5.2-r1"}]}],"versions":["1.3.1-r0","1.3.1-r1","1.4-r0","1.4-r1","1.4-r2","1.5-r0","1.6-r0","2.0.2-r0","2.0.2-r1","2.0.2-r2","2.0.2-r3","2.1.3-r0","2.1.3-r1","2.1.3-r2","2.1.3-r3","2.2.0-r0","2.2.0-r1","2.4.0-r0","2.4.2-r0","2.4.2-r1","2.4.2-r2","2.5.1-r0","2.5.2-r0"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/alpine/ALPINE-CVE-2021-27291.json"}},{"package":{"name":"py3-pygments","ecosystem":"Alpine:v3.12","purl":"pkg:apk/alpine/py3-pygments?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.6.1-r1"}]}],"versions":["1.3.1-r0","1.3.1-r1","1.4-r0","1.4-r1","1.4-r2","1.5-r0","1.6-r0","2.0.2-r0","2.0.2-r1","2.0.2-r2","2.0.2-r3","2.1.3-r0","2.1.3-r1","2.1.3-r2","2.1.3-r3","2.2.0-r0","2.2.0-r1","2.4.0-r0","2.4.2-r0","2.4.2-r1","2.4.2-r2","2.5.1-r0","2.5.2-r0","2.5.2-r1","2.6.1-r0"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/alpine/ALPINE-CVE-2021-27291.json"}}],"schema_version":"1.7.3","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"}]}