{"answers":{"affected":"3 open source packages ship an affected version, including pygments and Pygments. It affects 1 product.","exploited":"There is no known exploitation of CVE-2022-40896 in the wild and no public exploit code.","fix":"Upgrade pygments to a fixed version for your release line: 2.15.0 or 2.15.1.","what":"CVE-2022-40896 is a medium-severity denial of service vulnerability in n/a, published on 19 Jul 2023. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2022-40896 and fix it if it is affected.\n\nWhat it is: CVE-2022-40896 is a medium-severity denial of service vulnerability in n/a, published on 19 Jul 2023. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2022-40896 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- pygments (PyPI): affected all versions; fixed in 2.15.0\n- pygments (PyPI): affected all versions; fixed in 2.15.1\n- Pygments (PyPI): affected all versions; fixed in 2.15.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2022-40896/ (Markdown: https://insights.sbomify.com/CVE-2022-40896/index.md)","id":"CVE-2022-40896","markdown":"https://insights.sbomify.com/CVE-2022-40896/index.md","name":"CVE-2022-40896","record":{"aliases":["AZL-27502","AZL-35139","DEBIAN-CVE-2022-40896","GHSA-mrwq-x4v8-fh7p","MGASA-2024-0107","MINI-pvx8-36jq-fh6r","OESA-2023-1477","OESA-2023-1478","OESA-2023-1479","PYSEC-2023-117","ROOT-APP-PYPI-CVE-2022-40896","UBUNTU-CVE-2022-40896","USN-7128-1"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["denial_of_service"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Python syntax highlighting library","requires_auth":"none","summary":"Attackers can cause denial of service in applications using Pygments via a ReDoS vulnerability in the Smithy lexer.","user_interaction":"required","vuln_class":"denial_of_service"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"mitre","cpe":[{"product":"pygments","vendor":"pygments"}],"cvss":{"score":5.5,"severity":"medium","source":"nvd","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","version":"3.1"},"cwes":[{"id":"CWE-434","name":"Unrestricted Upload of File with Dangerous Type"}],"description":"A ReDoS issue was discovered in pygments/lexers/smithy.py in pygments through 2.15.0 via SmithyLexer.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Pygments vulnerable to ReDoS","id":"CVE-2022-40896","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"denial_of_service","year":"2022"},"n_packages":3,"n_references":5,"next":{"headline":"pypa/setuptools vulnerable to Regular Expression Denial of Service (ReDoS)","id":"CVE-2022-40897"},"packages":[{"ecosystem":"PyPI","fixed":["2.15.0"],"introduced":["0"],"last_affected":[],"package":"Pygments","purl":null,"source":"GHSA-mrwq-x4v8-fh7p"},{"ecosystem":"PyPI","fixed":["2.15.0"],"introduced":["0"],"last_affected":[],"package":"pygments","purl":"pkg:pypi/pygments","source":"GHSA-mrwq-x4v8-fh7p"},{"ecosystem":"PyPI","fixed":["2.15.1"],"introduced":["0"],"last_affected":[],"package":"pygments","purl":"pkg:pypi/pygments","source":"PYSEC-2023-117"}],"prev":{"headline":"Information disclosure in n/a","id":"CVE-2022-40895"},"products":["n/a"],"published":"2023-07-19","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2024-11-27","vendors":["n/a"]},"summary":"Attackers can cause denial of service in applications using Pygments via a ReDoS vulnerability in the Smithy lexer.","url":"https://insights.sbomify.com/CVE-2022-40896/"}