Advisory

PYSEC-2021-141

Also known as: CVE-2021-27291, GHSA-pq64-v7f5-gqh8

Summary

The record has no summary.

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.

Severity

Not rated by the source.

Dates

Published
2021-03-17 13:15 UTC
Modified
2023-11-08 04:05 UTC

Affected packages and fixes

pygments

PyPI · All systems

Affected

  • introduced 1.1, fixed 2.7.4 (ecosystem)

Fixed versions

2.7.4

Fix

  • Fixed version 2.7.4
    pip install --upgrade pygments==2.7.4

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: PyPA Advisory Database · CC BY 4.0

Sources & licences