7.5
CWE
400 1333
Advisory Published
CVE Published
Advisory Published
Updated

CVE-2021-27291

First published: Mon Jan 11 2021(Updated: )

A denial of service attack was discovered against pygments. Some of the regular expressions used to tokenise source code for highlighting have exponential complexity. A specially crafted input file could cause pygments to take effectively infinite time to parse, consuming CPU resources and denying access to the service.

Credit: cve@mitre.org cve@mitre.org cve@mitre.org

Affected SoftwareAffected VersionHow to fix
pip/Pygments>=1.1<2.7.4
2.7.4
Pygments Pygments>=1.1<2.7.4
Debian Debian Linux=9.0
Debian Debian Linux=10.0
Fedoraproject Fedora=32
Fedoraproject Fedora=33
debian/pygments<=2.3.1+dfsg-1+deb10u1<=2.7.1+dfsg-2<=2.3.1+dfsg-1
2.3.1+dfsg-1+deb10u2
2.7.1+dfsg-2.1
redhat/python-pygments<2.7.4
2.7.4
redhat/automation-hub<0:4.2.2-1.el7
0:4.2.2-1.el7
redhat/python3-django<0:2.2.18-1.el7
0:2.2.18-1.el7
redhat/python-bleach<0:3.3.0-1.el7
0:3.3.0-1.el7
redhat/python-bleach-allowlist<0:1.0.3-1.el7
0:1.0.3-1.el7
redhat/python-galaxy-importer<0:0.2.15-1.el7
0:0.2.15-1.el7
redhat/python-galaxy-ng<0:4.2.2-1.el7
0:4.2.2-1.el7
redhat/python-pulp-ansible<1:0.5.6-1.el7
1:0.5.6-1.el7
redhat/automation-hub<0:4.2.2-1.el8
0:4.2.2-1.el8
redhat/python3-django<0:2.2.18-1.el8
0:2.2.18-1.el8
redhat/python-bleach<0:3.3.0-1.el8
0:3.3.0-1.el8
redhat/python-bleach-allowlist<0:1.0.3-1.el8
0:1.0.3-1.el8
redhat/python-galaxy-importer<0:0.2.15-1.el8
0:0.2.15-1.el8
redhat/python-galaxy-ng<0:4.2.2-1.el8
0:4.2.2-1.el8
redhat/python-pulp-ansible<1:0.5.6-1.el8
1:0.5.6-1.el8
redhat/resource-agents<0:4.1.1-98.el8
0:4.1.1-98.el8
redhat/python27-babel<0:0.9.6-10.el7
0:0.9.6-10.el7
redhat/python27-python<0:2.7.18-3.el7
0:2.7.18-3.el7
redhat/python27-python-jinja2<0:2.6-16.el7
0:2.6-16.el7
redhat/python27-python-pygments<0:1.5-5.el7
0:1.5-5.el7
debian/mediawiki
1:1.31.16-1+deb10u2
1:1.31.16-1+deb10u6
1:1.35.11-1~deb11u1
1:1.35.13-1~deb11u1
1:1.39.4-1~deb12u1
1:1.39.5-1~deb12u1
1:1.39.5-1
debian/pygments
2.3.1+dfsg-1+deb10u2
2.7.1+dfsg-2.1
2.14.0+dfsg-1
2.15.1+dfsg-1
ubuntu/pygments<2.7.1+dfsg-2ubuntu1
2.7.1+dfsg-2ubuntu1
ubuntu/pygments<2.2.0+dfsg-1ubuntu0.2
2.2.0+dfsg-1ubuntu0.2
ubuntu/pygments<2.3.1+dfsg-1ubuntu2.2
2.3.1+dfsg-1ubuntu2.2
ubuntu/pygments<2.3.1+dfsg-4ubuntu0.2
2.3.1+dfsg-4ubuntu0.2
ubuntu/pygments<2.7.1+dfsg-2ubuntu1
2.7.1+dfsg-2ubuntu1
ubuntu/pygments<2.7.4
2.7.4
ubuntu/pygments<2.1+dfsg-1ubuntu0.2
2.1+dfsg-1ubuntu0.2
ubuntu/pygments<1.6+dfsg-1ubuntu1.1+
1.6+dfsg-1ubuntu1.1+
ubuntu/pygments<2.7.1+dfsg-2ubuntu1
2.7.1+dfsg-2ubuntu1
ubuntu/pygments<2.7.1+dfsg-2ubuntu1
2.7.1+dfsg-2ubuntu1
ubuntu/pygments<2.7.1+dfsg-2ubuntu1
2.7.1+dfsg-2ubuntu1
ubuntu/pygments<2.7.1+dfsg-2ubuntu1
2.7.1+dfsg-2ubuntu1

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Reference Links

Frequently Asked Questions

  • What is the vulnerability ID?

    The vulnerability ID is CVE-2021-27291.

  • What is the severity of CVE-2021-27291?

    CVE-2021-27291 has a severity value of 7, which is considered high.

  • What is the description of CVE-2021-27291?

    CVE-2021-27291 is a denial of service attack against pygments where specially crafted input files can cause the software to take infinite time to parse, consuming CPU resources.

  • How do I fix CVE-2021-27291?

    To fix CVE-2021-27291, update your pygments package to version 2.7.4.

  • Where can I find more information about CVE-2021-27291?

    You can find more information about CVE-2021-27291 in the references provided: 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

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2024 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203