SecurityContext

CVE-2022-40896: pygments - Regular Expression Denial of Service

  • Cve: CVE-2022-40896
  • Name: pygments - Regular Expression Denial of Service
  • Description: A ReDoS issue was discovered in pygments/lexers/smithy.py in pygments through 2.15.0 via SmithyLexer.
  • Impact: Attackers can cause denial of service by triggering excessive regex processing, disrupting service availability.
  • Remediation: Update to the latest version of pygments where the issue is fixed.
  • Vulnerability impact: denial_of_service
  • Requirement type: none
  • Labels source: projectdiscovery
  • Severity: medium
  • Cvss score: 5.5
  • Cvss vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
  • Epss score: 0.00519
  • Epss percentile: 0.44946
  • Assignee: [email protected]
  • Published at: 2023-07-19T15:15:10Z
  • Age in days: 1224
  • Modified at: 2026-06-17T05:02:12Z
  • Patch available: yes
  • Public exploits total: 1
  • References total: 7
  • Products total: 1
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2022-40896
  • Nvd status: modified
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits capped, rejected by nvd
  • Not known: vulnerability type, requirements, hackerone

Cwe

IdName
CWE-434Unrestricted Upload of File with Dangerous Type

Public exploits

UrlSourceAdded date
https://pyup.io/posts/pyup-discovers-redos-vulnerabilities-in-top-python-packages-part-2/nvd2023-07-19

References

Same in every row:

  • Source: nvd
UrlTags
https://pyup.io/posts/pyup-discovers-redos-vulnerabilities-in-top-python-packages-part-2/Exploit, Patch, Third Party Advisory
https://github.com/pygments/pygments/blob/master/pygments/lexers/smithy.py#L61Third Party Advisory
https://pypi.org/project/Pygments/Product
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/EZGMXALE3HSP4OXC7UUWIKX3OXKZDTY3/
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VUZO4BQCIY2S2KZYHERQMKURB7AHXDBO/
https://lists.fedoraproject.org/archives/list/[email protected]/message/EZGMXALE3HSP4OXC7UUWIKX3OXKZDTY3/
https://lists.fedoraproject.org/archives/list/[email protected]/message/VUZO4BQCIY2S2KZYHERQMKURB7AHXDBO/

Products

ProductAffectedPlatform boundSourcesUrl
pygments:pygments<= 2.15.0nonvd/v1/products/pygments/pygments

Projects

RepositoryLink kindsIndexedUrl
pygments/pygmentscommit, packageyes/v1/repositories/pygments/pygments

Index

  • Repositories: 489
  • Repositories high signal: 229
  • Packages: 1

Exploitation

  • Public exploit: yes
  • Public exploit count: 1
  • Public exploit first date: 2023-07-19
  • Exposed hosts: 1179
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access, remote, authentication required
  • Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since, hackerone reports