CVE-2022-40896
CVE-2022-40896 is a medium-severity vulnerability in Pygments with a CVSS 3.x base score of 5.5. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-434.
Key facts
- Severity: Medium (CVSS 3.x base score 5.5)
- EPSS exploit prediction: 1% (39th percentile)
- Actively exploited: Not listed in CISA KEV
- Weakness: CWE-434
- Affected product: Pygments
- Published:
- Last modified:
Description
A ReDoS issue was discovered in pygments/lexers/smithy.py in pygments through 2.15.0 via SmithyLexer.
Frequently asked questions
- What is CVE-2022-40896?
- A ReDoS issue was discovered in pygments/lexers/smithy.py in pygments through 2.15.0 via SmithyLexer.
- How severe is CVE-2022-40896?
- CVE-2022-40896 has a CVSS 3.x base score of 5.5, rated medium severity. It is exploitable over local access with low attack complexity, requires no privileges and user interaction. Impact on confidentiality is none, integrity none, and availability high.
- Is CVE-2022-40896 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 1% (39th percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2022-40896?
- CVE-2022-40896 affects Pygments. See the affected-products list for the exact vulnerable versions.
- How do I fix CVE-2022-40896?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround.
- When was CVE-2022-40896 published?
- CVE-2022-40896 was published on 2023-07-19 and last updated on 2026-06-17.
References
- https://github.com/pygments/pygments/blob/master/pygments/lexers/smithy.py#L61
- 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://pypi.org/project/Pygments/
- https://pyup.io/posts/pyup-discovers-redos-vulnerabilities-in-top-python-packages-part-2/
- https://lists.fedoraproject.org/archives/list/[email protected]/message/EZGMXALE3HSP4OXC7UUWIKX3OXKZDTY3/
- https://lists.fedoraproject.org/archives/list/[email protected]/message/VUZO4BQCIY2S2KZYHERQMKURB7AHXDBO/
Affected products (1)
- cpe:2.3:a:pygments:pygments:*:*:*:*:*:*:*:*
More vulnerabilities in Pygments
- CVE-2015-8557 — Critical (CVSS 9.0): The FontManager._get_nix_font_path function in formatters/img.py in Pygments 1.2.2 through 2.0.2 allows remote…
- CVE-2021-20270 — High (CVSS 7.5): An infinite loop in SMLLexer in Pygments versions 1.5 to 2.7.3 may lead to denial of service when performing syntax…
- CVE-2021-27291 — High (CVSS 7.5): In pygments 1.1+, fixed in 2.7.4, the lexers used to parse programming languages rely heavily on regular expressions.…
Other CWE-434 (Unrestricted Upload of File with Dangerous Type) vulnerabilities
- CVE-2026-48283 — Critical (CVSS 10.0): ColdFusion versions 2025.9, 2023.20 and earlier are affected by an Unrestricted Upload of File with Dangerous Type…
- CVE-2026-48276 — Critical (CVSS 10.0): ColdFusion versions 2025.9, 2023.20 and earlier are affected by an Unrestricted Upload of File with Dangerous Type…
- CVE-2026-57700 — Critical (CVSS 10.0): Unrestricted Upload of File with Dangerous Type vulnerability in Daan.Dev OMGF Pro allows Using Malicious Files. This…
- CVE-2025-69129 — Critical (CVSS 10.0): Unauthenticated Arbitrary File Upload in WordPress & WooCommerce Scraper Plugin, Import Data from Any Site <= 1.0.7…
- CVE-2026-40772 — Critical (CVSS 10.0): Unauthenticated Arbitrary File Upload in GeekyBot <= 1.2.2 versions.
- CVE-2026-40412 — Critical (CVSS 10.0): Unrestricted upload of file with dangerous type in Azure Orbital Spatio allows an unauthorized attacker to execute code…
Browse all CWE-434 (Unrestricted Upload of File with Dangerous Type) vulnerabilities →