Advisory

GHSA-9w8r-397f-prfh

Also known as: CVE-2021-20270, PYSEC-2021-140

Summary

Infinite Loop in Pygments

Details

An infinite loop in SMLLexer in Pygments versions 1.5 to 2.7.3 may lead to denial of service when performing syntax highlighting of a Standard ML (SML) source file, as demonstrated by input that only contains the "exception" keyword.

Severity

High Basis: The source's own band: HIGH

Dates

Published
2021-04-20 16:35 UTC
Modified
2024-10-14 18:43 UTC

Affected packages and fixes

pygments

PyPI · All systems

Affected

  • introduced 1.5, 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: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences