cve.bz

CVE-2022-40896 pygments pygments

5.5 mediumExploit referenceEPSS 0.5%Fix available

Medium (5.5) in pygments pygments. EPSS 0.5% estimated probability of exploitation activity in the next 30 days. Fixed in pygments 2.15.0, 2.15.1.

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

Severity

CVSS 3.1

5.5 medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
EPSS
0.5% (unchanged from 0.5% a week ago; 0.5% 30 days ago) estimated probability of exploitation activity in the next 30 days; 45th percentile. Scored 2026-11-23. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2024-11-27. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-434 Unrestricted Upload of File with Dangerous Type
OWASP Top 10
A06:2025 Insecure Design
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2022-40896 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2022-40896?via=ask-ai-copy and https://cve.bz/cve/CVE-2022-40896?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2022-40896 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
pygments:pygmentsthrough 2.15.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-mrwq-x4v8-fh7pPyPIpygments<2.15.02.15.0
PYSEC-2023-117PyPIpygments<2.15.12.15.1

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12pygmentsno fix listedDEBIAN-CVE-2022-40896
Debian13, 14pygments2.15.1+dfsg-1DEBIAN-CVE-2022-40896
Ubuntu18.04:LTS, 20.04:LTSpygmentsno fix listedUBUNTU-CVE-2022-40896
Ubuntu22.04:LTSpygments2.11.2+dfsg-2ubuntu0.1UBUNTU-CVE-2022-40896 USN-7128-1
Red Hatansible_automation_platform:2.4::el8ansible-automation-platform-installer0:2.4-6.el8apRHSA-2024:1057
Red Hatansible_automation_platform:2.4::el8ansible-rulebook, automation-eda-controller, automation-eda-controller-ui and 1 more0:1.0.5-1.el8apRHSA-2024:1057
Red Hatansible_automation_platform:2.4::el8python39-aiohttp, python3x-aiohttp, python39-aiohttp-debuginfo and 1 more0:3.9.1-1.el8apRHSA-2024:1057
Red Hatansible_automation_platform:2.4::el8python39-django, python3x-django0:4.2.10-1.el8apRHSA-2024:1057
Red Hatansible_automation_platform:2.4::el8python39-pillow, python3x-pillow, python39-pillow-debuginfo and 1 more0:10.0.1-1.el8apRHSA-2024:1057
Red Hatansible_automation_platform:2.4::el8python39-pycryptodomex, python3x-pycryptodomex, python39-pycryptodomex-debuginfo and 1 more0:3.20.0-1.el8apRHSA-2024:1057
Red Hatansible_automation_platform:2.4::el8, ansible_automation_platform_developer:2.4::el8, ansible_automation_platform_inside:2.4::el8python39-jinja2, python3x-jinja20:3.1.3-1.el8apRHSA-2024:1057
Red Hatansible_automation_platform:2.4::el8, ansible_automation_platform_developer:2.4::el8, ansible_automation_platform_inside:2.4::el8python39-pygments, python3x-pygments0:2.17.2-1.el8apRHSA-2024:1057
Red Hatansible_automation_platform:2.4::el9ansible-automation-platform-installer0:2.4-6.el9apRHSA-2024:1057
Red Hatansible_automation_platform:2.4::el9ansible-rulebook, automation-eda-controller, automation-eda-controller-ui and 1 more0:1.0.5-1.el9apRHSA-2024:1057
Red Hatansible_automation_platform:2.4::el9python-aiohttp, python3-aiohttp, python3-aiohttp-debuginfo and 1 more0:3.9.1-1.el9apRHSA-2024:1057
Red Hatansible_automation_platform:2.4::el9python-django, python3-django0:4.2.10-1.el9apRHSA-2024:1057
17 more for Red Hat in the JSON and on Red Hat's page.
Azure Linux2python-pygments2.4.2-1AZL-27502
Azure Linux3python-pygments2.4.2-1AZL-35139

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

https://pyup.io/posts/pyup-discovers-redos-vulnerabilities-in-top-python-packages-part-2/

https://data.safetycli.com/vulnerabilities/CVE-2022-40896/58910/?utm_source=pyupio&utm_medium=redirect&utm_campaign=pyup_rd&utm_id=0817&utm_content=data

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

ProductPackageStateAdvisory
Red Hat Ansible Automation Platform 2.4 for RHEL 8python3x-pygments-0:2.17.2-1.el8apFixed 2024-02-29RHSA-2024:1057
Red Hat Ansible Automation Platform 2.4 for RHEL 8ansible-automation-platform-24/ee-supported-rhel8:1.0.0-572Fixed 2024-03-04RHSA-2024:1072
Red Hat Ansible Automation Platform 2.4 for RHEL 9python-pygments-0:2.17.2-1.el9apFixed 2024-02-29RHSA-2024:1057
Red Hat Ansible Automation Platform 2.4 for RHEL 9ansible-automation-platform-24/ee-supported-rhel9:1.0.0-573Fixed 2024-03-04RHSA-2024:1072
Red Hat Satellite 6.15 for RHEL 8python-pygments-0:2.17.0-1.el8pcFixed 2024-04-23RHSA-2024:2010
Red Hat Ansible Automation Platform 2aap-cloud-metrics-collector-containerWill not fix
Red Hat Ansible Automation Platform 2ansible-automation-platform-24/ansible-builder-rhel8Not affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-24/de-supported-rhel8Not affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-24/ee-dellemc-openmanage-rhel8Not affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-24/ee-minimal-rhel9Not affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-25/ee-cloud-services-rhel9Not affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-25/platform-resource-runner-rhel8Not affected
Red Hat Ansible Automation Platform 2ansible-lintNot affected
Red Hat Ansible Automation Platform 2ansible-navigatorNot affected
Red Hat Ansible Automation Platform 2python3x-ansible-compatNot affected
Red Hat Ansible Automation Platform 2python3x-django-lifecycleNot affected
Red Hat Ansible Automation Platform 2python-ansible-compatNot affected
Red Hat Ansible Automation Platform 2python-django-lifecycleNot affected
Red Hat Developer Hub 1rhdh/rhdh-hub-rhel9Not affected
Red Hat Enterprise Linux 6python-pygmentsOut of support scope
7 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2022-40896.

Attack patterns (CAPEC)

  • CAPEC-1 Accessing Functionality Not Properly Constrained by ACLs Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON