Read the docs
TI-2021-08825 Aliases CVE-2021-27291GHSA-pq64-v7f5-gqh8

In pygments 1.1+, fixed in 2.7.4, the lexers used to parse programming languages rely…

Priority LOW 39CWE-1333Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
Denial of service
Confidentiality · integrity · availability
None · None · High
Fix status
Partial Red Hat: 8 fixed, 3 without a fix

Attack profile from CVSS 3.1 · NVD. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-1333.

Summary

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.

Why it matters now

EPSS 0.03906 90th percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Partial Pygments (PyPI): 2.7.4Red Hat: 5 advisoriesRed Hat: 8 fixed, 3 without a fix

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
——all versions—No fix listedCNA
—Pygments (PyPI)1.1 to before 2.7.42.7.4Patch availableGHSA-pq64-v7f5-gqh8
  • — Vendor— Affected all versions Fixed in — No fix listed CNA
  • Pygments (PyPI) Vendor— Affected 1.1 to before 2.7.4 Fixed in 2.7.4 Patch available GHSA-pq64-v7f5-gqh8

CPE configurations NVD · 5

CPEVersionsRoleVendor
cpe:2.3:a:pygments:pygments:*:*:*:*:*:*:*:*1.1 to before 2.7.4VulnerablePygments
cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*9.0VulnerableDebian
cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*10.0VulnerableDebian
cpe:2.3:o:fedoraproject:fedora:32:*:*:*:*:*:*:*32VulnerableFedoraproject
cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:*33VulnerableFedoraproject
  • cpe:2.3:a:pygments:pygments:*:*:*:*:*:*:*:* Versions 1.1 to before 2.7.4 Vulnerable ·Pygments
  • cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:* Versions 9.0 Vulnerable ·Debian
  • cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:* Versions 10.0 Vulnerable ·Debian
  • cpe:2.3:o:fedoraproject:fedora:32:*:*:*:*:*:*:* Versions 32 Vulnerable ·Fedoraproject
  • cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:* Versions 33 Vulnerable ·Fedoraproject

Remediation

  • Fix · GHSA-pq64-v7f5-gqh8 Pygments (PyPI) Fixed in 2.7.4 Advisory →

Red Hat 5 advisories

  • RHSA-2021:4150 Released 2021-11-09 · Red Hat rating Moderate
    python36:3.6 security and bug fix update
    • Red Hat Enterprise Linux AppStream (v. 8) python-PyMySQL-0.10.1-2.module+el8.4.0+9657+a4b6a102.src::python36:3.6, python-distro-1.4.0-2.module+el8.1.0+3334+5cb623d7.src::python36:3.6, python-docs-3.6.7-2.module+el8.1.0+3334+5cb623d7.src::python36:3.6 +47
  • RHSA-2021:4151 Released 2021-11-09 · Red Hat rating Moderate
    python27:2.7 security update
    • Red Hat Enterprise Linux AppStream (v. 8) Cython-0.28.1-7.module+el8.1.0+3111+de3f2d8e.src::python27:2.7, PyYAML-3.12-16.module+el8.1.0+3111+de3f2d8e.src::python27:2.7, babel-2.5.1-10.module+el8.5.0+11014+88fc0d0b.noarch::python27:2.7 +47
  • RHSA-2021:4139 Released 2021-11-09 · Red Hat rating Moderate
    resource-agents security, bug fix, and enhancement update
    • Red Hat Enterprise Linux High Availability (v. 8) resource-agents-4.1.1-98.el8, resource-agents-aliyun-4.1.1-98.el8, resource-agents-gcp-4.1.1-98.el8 +1
    • Red Hat Enterprise Linux Resilient Storage (v. 8) resource-agents-4.1.1-98.el8, resource-agents-aliyun-4.1.1-98.el8, resource-agents-gcp-4.1.1-98.el8 +1
Show 2 more Red Hat advisories
  • RHSA-2021:3252 Released 2021-08-24 · Red Hat rating Moderate
    python27 security update
    • Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) python27-babel-0.9.6-10.el7, python27-python-2.7.18-3.el7, python27-python-babel-0.9.6-10.el7 +8
    • Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.7) python27-babel-0.9.6-10.el7, python27-python-2.7.18-3.el7, python27-python-babel-0.9.6-10.el7 +8
    • Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) python27-babel-0.9.6-10.el7, python27-python-2.7.18-3.el7, python27-python-babel-0.9.6-10.el7 +8
  • RHSA-2021:0781 Released 2021-03-09 · Red Hat rating Moderate
    Red Hat Ansible Automation Platform 1.2.2 security and bug fix update
    • Red Hat Automation Hub 4.2 for RHEL 7 automation-hub-4.2.2-1.el7pc, python-bleach-3.3.0-1.el7pc, python-bleach-allowlist-1.0.3-1.el7pc +9
    • Red Hat Automation Hub 4.2 for RHEL 8 automation-hub-4.2.2-1.el8pc, python-bleach-3.3.0-1.el8pc, python-bleach-allowlist-1.0.3-1.el8pc +9

Vendor assessments

Red Hat

Red Hat rating: Moderate. Red Hat's page for this CVE →

ProductStatusPlan or fix
Red Hat Enterprise Linux 6AffectedNo fix planned: Out of support scope
Red Hat Enterprise Linux 7AffectedNo fix planned: Out of support scope
Red Hat OpenStack Platform 10 (Newton)AffectedNo fix planned: Out of support scope
Red Hat Automation Hub 4.2 for RHEL 7Fixed RHSA-2021:0781
Red Hat Automation Hub 4.2 for RHEL 8Fixed RHSA-2021:0781
Red Hat Enterprise Linux AppStream (v. 8)Fixed RHSA-2021:4150, RHSA-2021:4151
Red Hat Enterprise Linux High Availability (v. 8)Fixed RHSA-2021:4139
Red Hat Enterprise Linux Resilient Storage (v. 8)Fixed RHSA-2021:4139
Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7)Fixed RHSA-2021:3252
Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.7)Fixed RHSA-2021:3252
Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7)Fixed RHSA-2021:3252

Timeline

  1. 2026-10-02 Threatist record created from CVE-2021-27291
  2. 2026-10-03 Alias added: GHSA-pq64-v7f5-gqh8
  3. 2026-10-07 EPSS moved to the 90th–95th percentile

References

Sources