Live threats

All CVEs / Pygments

CVE-2022-40896Pygments

Medium 5.5

Priority
33
CVSS 3.1
5.5
EPSS
0.4%
probability of exploitation in 30 days · percentile 28
Auth required
Yes
Published
Jul 19, 2023
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-434
SSVC (CISA)
Exploitation: none · Automatable: no · Technical impact: partial
Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H

What happens

A ReDoS issue was discovered in pygments/lexers/smithy.py in pygments through 2.15.0 via SmithyLexer.

Original NVD text.

What to do

  1. Apply the vendor's security update for Pygments.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
PyPI pygments < 2.15.0 2.15.0 pip install "pygments>=2.15.0"
PyPI pygments < 2.15.1 2.15.1 pip install "pygments>=2.15.1"

Per OSV / GitHub Advisories (GHSA-mrwq-x4v8-fh7p, PYSEC-2023-117). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
pygmentspygments≤ 2.15.0

Official sources

References

Links published by the sources. Open them with care.