CVE-2022-40896: Malicious File Upload

Published Jul 19, 2023
·
Updated

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

Other sources

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

Launchpad

Affected Software

6 affected componentsFixes available
pip/Pygments<2.15.0
2.15.0
debian/pygments<=2.7.1+dfsg-2.1, <=2.14.0+dfsg-1
2.18.0+dfsg-1
Pygments Pygments<=2.15.0
Microsoft azl3 python-pygments 2.4.2-1
IBM Db2 Genius Hub<=1.1, 1.1.1, 1.1.2
IBM Agentics<=1.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/Pygments to a version that resolves this vulnerability.

    Fixed in 2.15.0
  2. Upgrade

    Upgrade debian/pygments to a version that resolves this vulnerability.

    Fixed in 2.18.0+dfsg-1
  3. Upgrade

    Upgrade pygments to a version that resolves this vulnerability.

    Fixed in 2.15.0

Event History

Jul 19, 2023
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
Description
Advisory Published
via GitHub·03:30 PM
Nov 27, 2023
Data Sourced
via Red Hat·03:00 AM
DescriptionSeverityAffected Software
Nov 26, 2024
Data Sourced
via Launchpad·04:21 PM
Description
Nov 30, 2024
Data Sourced
via Ubuntu·04:21 PM
RemedyDescriptionSeverityAffected Software
Oct 1, 2025
Data Sourced
via Microsoft·11:11 PM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·11:11 PM
Affected Software
Updated
via Microsoft·11:11 PM
DescriptionSeverity
Jul 13, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2022-40896?

The severity of CVE-2022-40896 is medium with a CVSS score of 5.5.

2

Which software versions are affected by CVE-2022-40896?

Pygments versions up to and including 2.15.0 are affected by CVE-2022-40896.

3

What is the vulnerability description of CVE-2022-40896?

CVE-2022-40896 is a ReDoS (Regular Expression Denial of Service) vulnerability discovered in the `pygments/lexers/smithy.py` file in Pygments, impacting versions until 2.15.0 via the SmithyLexer.

4

How can I mitigate CVE-2022-40896?

To mitigate CVE-2022-40896, it is recommended to update Pygments to version 2.15.0.

5

Where can I find more information about CVE-2022-40896?

You can find more information about CVE-2022-40896 on the following references: [Link 1](https://pypi.org/project/Pygments/), [Link 2](https://pyup.io/posts/pyup-discovers-redos-vulnerabilities-in-top-python-packages-part-2/), [Link 3](https://github.com/pygments/pygments/blob/master/pygments/lexers/smithy.py#L61).

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203