{"answers":{"affected":"2 open source packages ship an affected version, including loofah. It affects 1 product.","exploited":"There is no known exploitation of CVE-2022-23516 in the wild and no public exploit code.","fix":"Upgrade loofah to 2.19.1 or later.","what":"CVE-2022-23516 is a high-severity vulnerability in flavorjones loofah, published on 14 Dec 2022."},"fix_prompt":"Check this codebase for CVE-2022-23516 and fix it if it is affected.\n\nWhat it is: CVE-2022-23516 is a high-severity vulnerability in flavorjones loofah, published on 14 Dec 2022. \nExploitation: There is no known exploitation of CVE-2022-23516 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- loofah (RubyGems): affected from 2.2.0; fixed in 2.19.1\n- loofah (RubyGems): affected from 2.2.0; fixed in 2.19.1\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-23516/ (Markdown: https://insights.sbomify.com/CVE-2022-23516/index.md)","id":"CVE-2022-23516","markdown":"https://insights.sbomify.com/CVE-2022-23516/index.md","name":"CVE-2022-23516","record":{"aliases":["DEBIAN-CVE-2022-23516","GHSA-3x8r-x6xp-q4vm","UBUNTU-CVE-2022-23516"],"analysis":null,"analysis_generated_by":null,"assigner":"GitHub_M","cpe":[{"product":"loofah","vendor":"loofah_project"}],"cvss":{"score":7.5,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","version":"3.1"},"cwes":[{"id":"CWE-674","name":"Uncontrolled Recursion"}],"description":"Loofah is a general library for manipulating and transforming HTML/XML documents and fragments, built on top of Nokogiri. Loofah \u003e= 2.2.0, \u003c 2.19.1 uses recursion for sanitizing CDATA sections, making it susceptible to stack exhaustion and raising a SystemStackError exception.  This may lead to a denial of service through CPU resource consumption. This issue is patched in version 2.19.1. Users who are unable to upgrade may be able to mitigate this vulnerability by limiting the length of the strings that are sanitized.","ecosystems":["RubyGems"],"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":"Uncontrolled Recursion in Loofah","id":"CVE-2022-23516","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"RubyGems","product":null,"products":[],"type":null,"year":"2022"},"n_packages":2,"n_references":2,"next":{"headline":"Inefficient Regular Expression Complexity in rails-html-sanitizer","id":"CVE-2022-23517"},"packages":[{"ecosystem":"RubyGems","fixed":["2.19.1"],"introduced":["2.2.0"],"last_affected":[],"package":"loofah","purl":null,"source":"GHSA-3x8r-x6xp-q4vm"},{"ecosystem":"RubyGems","fixed":["2.19.1"],"introduced":["2.2.0"],"last_affected":[],"package":"loofah","purl":"pkg:gem/loofah","source":"GHSA-3x8r-x6xp-q4vm"}],"prev":{"headline":"Improper neutralization of data URIs may allow XSS in Loofah","id":"CVE-2022-23515"},"products":["loofah"],"published":"2022-12-14","related":[{"cvss_score":7.5,"headline":"Inefficient Regular Expression Complexity in Loofah","id":"CVE-2022-23514","kev_date_added":null,"published":"2022-12-14"}],"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":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-11-03","vendors":["flavorjones"]},"summary":null,"url":"https://insights.sbomify.com/CVE-2022-23516/"}