CVE & CISA-KEV Catalog

CVE-2021-27291

HIGHEPSS 90th pctl
7.5
CVSS v3
NVD

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.

How to fix

Remediation Available
python-pygmentsAmazon
Fixed in:0:1.4-10.amzn2.0.1
python3-pygmentsAmazon
Fixed in:0:2.2.0-3.amzn2.0.3
python3-pygments-docAmazon
Fixed in:0:2.2.0-3.amzn2.0.3
mediawikiDebian
Fixed in:1:1.35.2-1CVE-2021-27291
Fixed in:1:1.35.2-1CVE-2021-27291
Fixed in:1:1.35.2-1CVE-2021-27291
pygmentsUbuntu
Fixed in:1.6+dfsg-1ubuntu1.1+esm1USN-4897-2

This Ubuntu release reached end-of-life on 2019-04-02.

Fixed in:2.1+dfsg-1ubuntu0.2USN-4897-1

This Ubuntu release reached end-of-life on 2021-04-02.

Fixed in:2.2.0+dfsg-1ubuntu0.2USN-4897-1

This Ubuntu release reached end-of-life on 2023-05-31. Extended security maintenance is available until 2028-04-01.

Fixed in:2.3.1+dfsg-1ubuntu2.2USN-4897-1

This Ubuntu release reached end-of-life on 2025-05-31. Extended security maintenance is available until 2030-04-02.

python-pygmentsUbuntu
Fixed in:1.6+dfsg-1ubuntu1.1+esm1USN-4897-2

This Ubuntu release reached end-of-life on 2019-04-02.

Fixed in:2.1+dfsg-1ubuntu0.2USN-4897-1

This Ubuntu release reached end-of-life on 2021-04-02.

Fixed in:2.2.0+dfsg-1ubuntu0.2USN-4897-1

This Ubuntu release reached end-of-life on 2023-05-31. Extended security maintenance is available until 2028-04-01.

Fixed in:2.3.1+dfsg-1ubuntu2.2USN-4897-1

This Ubuntu release reached end-of-life on 2025-05-31. Extended security maintenance is available until 2030-04-02.

python3-pygmentsUbuntu
Fixed in:1.6+dfsg-1ubuntu1.1+esm1USN-4897-2

This Ubuntu release reached end-of-life on 2019-04-02.

Fixed in:2.1+dfsg-1ubuntu0.2USN-4897-1

This Ubuntu release reached end-of-life on 2021-04-02.

Fixed in:2.2.0+dfsg-1ubuntu0.2USN-4897-1

This Ubuntu release reached end-of-life on 2023-05-31. Extended security maintenance is available until 2028-04-01.

Fixed in:2.3.1+dfsg-1ubuntu2.2USN-4897-1

This Ubuntu release reached end-of-life on 2025-05-31. Extended security maintenance is available until 2030-04-02.

TridentStack Control can deploy fixes like this automatically across your Windows, macOS, and Linux fleet. See how it works

Remediation is compiled from vendor and distribution security advisories. Always confirm against the linked source for your exact version and platform.

CVSS v3 Vector

Exploitability

Attack VectorNetwork
Attack ComplexityLow
Privileges RequiredNone
User InteractionNone
ScopeUnchanged

Impact

ConfidentialityNone
IntegrityNone
AvailabilityHigh

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Exploit Intelligence

3.91%probability of exploitation in 30 days
90thpercentile

Elevated risk: more likely to be exploited than 90% of all known CVEs.

References

Related Vulnerabilities

Other CWE-1333 vulnerabilities, ordered by exploit likelihood. View all

CVESeverityCVSSEPSSExploitedFix
CVE-2023-3364High7.544%-Fix
CVE-2024-8124High7.540%-Fix
CVE-2024-25126Medium5.335%-Fix
CVE-2024-2651Medium6.533%-Fix
CVE-2021-32837High7.529%-Fix
CVE-2024-2829High7.526%-Fix

Common questions

How do I fix CVE-2021-27291?

Published advisories record a fix for 7 affected products. The "How to fix" section on this page lists the fixed version and source advisory for each one, so apply the entry matching what you actually run.

Is CVE-2021-27291 being actively exploited?

Not that we know of. CVE-2021-27291 is not in the CISA Known Exploited Vulnerabilities catalog. Its EPSS score of 3.9% is the estimated probability that it will be exploited in the next 30 days. That is higher than 90% of all scored CVEs.

How severe is CVE-2021-27291?

CVE-2021-27291 has a CVSS v3 base score of 7.5, rated high. CVSS rates the technical impact if the vulnerability is exploited, not how likely that is, so weigh it alongside the exploit-prediction score when you decide what to patch first.

What does CVE-2021-27291 affect?

Published advisories record a fix for python-pygments (Amazon), python3-pygments (Amazon), python3-pygments-doc (Amazon), mediawiki (Debian), and 3 more. Only products with a sourced advisory are listed, so treat this as what we can cite rather than a complete inventory.

Embed a live status badge for CVE-2021-27291
CVE-2021-27291 severity badge

Markdown

[![CVE-2021-27291](https://tridentstack.com/cve/badge/CVE-2021-27291.svg)](https://tridentstack.com/cve/CVE-2021-27291)

HTML

<a href="https://tridentstack.com/cve/CVE-2021-27291"><img src="https://tridentstack.com/cve/badge/CVE-2021-27291.svg" alt="CVE-2021-27291"></a>

Check your Linux endpoints for this class of vulnerability

TridentStack Control continuously scans Linux endpoints for known vulnerabilities and deploys the fixes from the same console. 200 endpoints free forever, no credit card.

Patch your fleet freeStart freeThis CVE lookup is free and always will be.

This product uses NVD data but is not endorsed or certified by the NVD. EPSS scores courtesy of FIRST.org (https://www.first.org/epss). Source: CISA KEV Catalog. Data as of 2026-06-17.