# pygments (PyPI) vulnerabilities

5 known vulnerabilities (1 medium), with the versions each affects and the releases that fix them.

## At a glance

- Latest release: not known (cve.now hasn't read this package's releases)
- Newest unaffected release: not known without release data
- Registry: https://pypi.org/project/pygments/

## Advisories (5)

### [CVE-2026-4539](https://cve.now/CVE-2026-4539): pygments archetype.py AdlLexer redos

- Severity: Medium 4.8
- Published: Mar 22, 2026
- Affected: fixed in 2.20.0.

### [CVE-2022-40896](https://cve.now/CVE-2022-40896): A ReDoS issue was discovered in pygments/lexers/smithy.py in pygments through 2.15.0 via SmithyLexer.

- Severity: Unrated
- Published: Jul 19, 2023
- Affected: fixed in 2.15.1; fixed in 2.15.0.

### [CVE-2021-20270](https://cve.now/CVE-2021-20270): 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…

- Severity: Unrated
- Published: Mar 23, 2021
- Affected: from 1.5, fixed in 2.7.4.

### [CVE-2021-27291](https://cve.now/CVE-2021-27291): In pygments 1.1+, fixed in 2.7.4, the lexers used to parse programming languages rely heavily on regular expressions.

- Severity: Unrated
- Published: Mar 17, 2021
- Affected: from 1.1, fixed in 2.7.4.

### [CVE-2015-8557](https://cve.now/CVE-2015-8557): The FontManager.\_get\_nix\_font\_path function in formatters/img.py in Pygments 1.2.2 through 2.0.2 allows remote attackers to execute…

- Severity: Unrated
- Published: Jan 8, 2016
- Affected: from 1.2.2, fixed in 2.1.

---

Source: cve.now
Built by [Sazabi](https://www.sazabi.com/?utm_source=cve-now&utm_medium=markdown), AI-native observability and security: automatic issue detection, plain-language log search and live dashboards.
Page: https://cve.now/packages/pypi/pygments
Site guide for agents: https://cve.now/llms.txt
Uses NVD data; not endorsed by NVD.
