{"id":"CVE-2022-23515","published":"2022-12-14T13:23:02Z","modified":"2025-11-03T21:45:54Z","title":"Improper neutralization of data URIs may allow XSS in Loofah","vendor":"flavorjones","product":"loofah","tier":"tail","description":{"text":"Loofah is a general library for manipulating and transforming HTML/XML documents and fragments, built on top of Nokogiri. Loofah >= 2.1.0, < 2.19.1 is vulnerable to cross-site scripting via the image/svg+xml media type in data URIs. This issue is patched in version 2.19.1.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.1,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00877,"percentile":0.59892,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/flavorjones/loofah/security/advisories/GHSA-228g-948r-83gx","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/flavorjones/loofah/issues/101","tags":["x_refsource_MISC"]},{"url":"https://hackerone.com/reports/1694173","tags":["x_refsource_MISC"]},{"url":"https://lists.debian.org/debian-lts-announce/2023/09/msg00011.html","tags":[]},{"url":"https://lists.debian.org/debian-lts-announce/2024/09/msg00044.html","tags":[]}],"priority":{"score":16.2,"factors":[{"name":"EPSS percentile","points":11.98},{"name":"CVSS severity","points":4.27}]},"vendorSlug":"flavorjones","affectedVersions":[{"vendor":"flavorjones","product":"loofah","versions":[">= 2.1.0, < 2.19.1"]}],"affected":[{"ecosystem":"RubyGems","package":"loofah","vulnerableRanges":[">=2.1.0, <2.19.1"],"patched":["2.19.1"],"from":["GHSA-228g-948r-83gx"],"provenance":"source"}],"summary":{"text":"The Loofah HTML/XML manipulation library, built on Nokogiri, contains a cross-site scripting flaw in its handling of data URIs that use the image/svg+xml media type. An attacker who can supply content that Loofah processes can inject script through such a data URI, and this requires the victim to interact with the malicious content and needs no authentication or prior network access.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:27:30Z"},"euvd":{"id":"EUVD-2022-7470","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-flavorjones-loofah-cve-2018-16468","parents":[{"from":"CVE-2019-15587","to":"CVE-2022-23515","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["lib/loofah/html5/safelist.rb"],"commits":["https://github.com/flavorjones/loofah/commit/0c6617af440879ce97440f6eb6c58636456dc8ec","https://github.com/flavorjones/loofah/commit/415677f3cf7f9254f42f811e784985cd63c7407f"],"basis":"shared function","functions":["SafeList"]}]}]}}