Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. Pygments
  4. ›
  5. CVE-2022-40896

CVE-2022-40896: Pygments vulnerable to ReDoS

July 19, 2023 (updated October 24, 2024)

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

References

  • github.com/advisories/GHSA-mrwq-x4v8-fh7p
  • github.com/pygments/pygments
  • github.com/pygments/pygments/blob/master/pygments/lexers/smithy.py
  • github.com/pygments/pygments/commit/97eb3d5ec7c1b3ea4fcf9dee30a2309cf92bd194
  • github.com/pygments/pygments/commit/dd52102c38ebe78cd57748e09f38929fd283ad04
  • github.com/pygments/pygments/commit/fdf182a7af85b1deeeb637ca970d31935e7c9d52
  • github.com/pypa/advisory-database/tree/main/vulns/pygments/PYSEC-2023-117.yaml
  • lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/EZGMXALE3HSP4OXC7UUWIKX3OXKZDTY3
  • lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VUZO4BQCIY2S2KZYHERQMKURB7AHXDBO
  • nvd.nist.gov/vuln/detail/CVE-2022-40896
  • pypi.org/project/Pygments
  • pyup.io/posts/pyup-discovers-redos-vulnerabilities-in-top-python-packages-part-2

Code Behaviors & Features

Detect and mitigate CVE-2022-40896 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 2.15.0

Fixed versions

  • 2.15.0

Solution

Upgrade to version 2.15.0 or above.

Impact 5.5 MEDIUM

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

Learn more about CVSS

Weakness

  • CWE-434: Unrestricted Upload of File with Dangerous Type

Source file

pypi/Pygments/CVE-2022-40896.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:51 +0000.