CVE-2021-27291

Source
https://nvd.nist.gov/vuln/detail/CVE-2021-27291
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2021-27291.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2021-27291
Aliases
Downstream
Related
Published
2021-03-17T13:15:15Z
Modified
2025-10-08T04:26:00.913503Z
Severity
  • 7.5 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
[none]
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.

References

Affected packages

Git / github.com/pygments/pygments

Affected ranges

Type
GIT
Repo
https://github.com/pygments/pygments
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed

Affected versions

0.*

0.10
0.11
0.11.1
0.5
0.5.1
0.6
0.7
0.7.1
0.8
0.8.1
0.9

1.*

1.0
1.1
1.1.1
1.2
1.2.1
1.2.2
1.3
1.3.1
1.4
1.5
1.6
1.6rc1

2.*

2.0
2.0.1
2.0.2
2.0rc1
2.1
2.1.1
2.1.2
2.1.3
2.2.0
2.3.0
2.3.1
2.4.0
2.4.1
2.4.2
2.5.0
2.5.1
2.5.2
2.6.0
2.6.1
2.7.0
2.7.1
2.7.2
2.7.3