{"answers":{"affected":"2 open source packages ship an affected version, including markdown-it. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-21670 exists.","fix":"Upgrade markdown-it to 12.3.2 or later.","what":"CVE-2022-21670 is a medium-severity denial of service vulnerability in markdown-it, published on 10 Jan 2022. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2022-21670 and fix it if it is affected.\n\nWhat it is: CVE-2022-21670 is a medium-severity denial of service vulnerability in markdown-it, published on 10 Jan 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-21670 exists.\n\nAffected packages and fixed versions:\n- markdown-it (npm): affected all versions; fixed in 12.3.2\n- markdown-it (npm): affected all versions; fixed in 12.3.2\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-21670/ (Markdown: https://insights.sbomify.com/CVE-2022-21670/index.md)","id":"CVE-2022-21670","markdown":"https://insights.sbomify.com/CVE-2022-21670/index.md","name":"CVE-2022-21670","record":{"aliases":["CLSA-2026-1773015255","CLSA-2026-1773620215","CLSA-2026-1789374715","CLSA-2026-1792369290","DEBIAN-CVE-2022-21670","GHSA-6vfc-qv3f-vr6c","ROOT-APP-NPM-CVE-2022-21670","UBUNTU-CVE-2022-21670"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":false,"product_category":"Markdown parser library","requires_auth":"none","summary":"An attacker can cause significant performance degradation in markdown-it by submitting specially crafted long inputs, leading to denial of service.","user_interaction":"not_required","vuln_class":"denial_of_service"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"markdown-it","vendor":"markdown-it_project"}],"cvss":{"score":5.3,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","version":"3.1"},"cwes":[{"id":"CWE-1333","name":"Inefficient Regular Expression Complexity"},{"id":"CWE-400","name":"Uncontrolled Resource Consumption"}],"description":"markdown-it is a Markdown parser. Prior to version 1.3.2, special patterns with length greater than 50 thousand characterss could slow down the parser significantly. Users should upgrade to version 12.3.2 to receive a patch. There are no known workarounds aside from upgrading.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Uncontrolled Resource Consumption in markdown-it","id":"CVE-2022-21670","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"denial_of_service","year":"2022"},"n_packages":2,"n_references":2,"next":{"headline":"Potential exposure of Replit tokens to an Unauthorized Actor in @replit/crosis","id":"CVE-2022-21671"},"packages":[{"ecosystem":"npm","fixed":["12.3.2"],"introduced":["0"],"last_affected":[],"package":"markdown-it","purl":null,"source":"GHSA-6vfc-qv3f-vr6c"},{"ecosystem":"npm","fixed":["12.3.2"],"introduced":["0"],"last_affected":[],"package":"markdown-it","purl":"pkg:npm/markdown-it","source":"GHSA-6vfc-qv3f-vr6c"}],"prev":{"headline":"Bot token exposed in main.py","id":"CVE-2022-21669"},"products":["markdown-it"],"published":"2022-01-10","related":[{"cvss_score":6.9,"headline":"markdown-it is has a Regular Expression Denial of Service (ReDoS)","id":"CVE-2026-2327","kev_date_added":null,"published":"2026-02-12"},{"cvss_score":6.9,"headline":"Markdown-it 14.1.0 - Cross-site scripting (XSS)","id":"CVE-2025-7969","kev_date_added":null,"published":"2025-08-21"},{"cvss_score":5.3,"headline":"markdown-it: Quadratic complexity DoS in smartquotes rule via replaceAt string operations","id":"CVE-2026-48988","kev_date_added":null,"published":"2026-06-17"},{"cvss_score":5.3,"headline":"Cross-site scripting in n/a","id":"CVE-2015-3295","kev_date_added":null,"published":"2017-06-07"},{"cvss_score":3.5,"headline":"markdown-it html_re.js redos","id":"CVE-2015-10005","kev_date_added":null,"published":"2022-12-27"}],"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":"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":"yes","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-04-22","vendors":["markdown-it"]},"summary":"An attacker can cause significant performance degradation in markdown-it by submitting specially crafted long inputs, leading to denial of service.","url":"https://insights.sbomify.com/CVE-2022-21670/"}