{"id":"CVE-2018-16468","published":"2018-10-30T21:00:00Z","modified":"2024-08-05T10:24:32Z","title":"In the Loofah gem for Ruby, through v2.2.2, unsanitized JavaScript may occur in sanitized output when a crafted SVG…","vendor":null,"product":null,"tier":"tail","description":{"text":"In the Loofah gem for Ruby, through v2.2.2, unsanitized JavaScript may occur in sanitized output when a crafted SVG element is republished.","provenance":"source","from":"CVE.org"},"cvss":null,"epss":{"score":0.00916,"percentile":0.61026,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://www.debian.org/security/2019/dsa-4364","tags":["vendor-advisory","x_refsource_DEBIAN"]},{"url":"https://github.com/flavorjones/loofah/issues/154","tags":["x_refsource_MISC"]}],"priority":{"score":12.2,"factors":[{"name":"EPSS percentile","points":12.21}]},"affectedVersions":[{"vendor":"n/a","product":"Loofah (Ruby Gem)","versions":["v2.2.3"]}],"affected":[{"ecosystem":"RubyGems","package":"loofah","vulnerableRanges":["<2.2.3"],"patched":["2.2.3"],"from":["GHSA-g4xq-jx4w-4cjv"],"provenance":"source"}],"summary":{"text":"The flaw is in the Loofah gem for Ruby, through version 2.2.2, where its HTML/markup sanitisation can leave unsanitised JavaScript in the output when a crafted SVG element is republished. The issue is a cross-site scripting weakness (improper neutralisation of input during web page generation) affecting the sanitised output that applications render. An attacker who can supply a crafted SVG element that is then sanitised and republished could cause script to reach the rendered page, executing in the context of a victim's browser, which typically requires that a user view the affected content.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:02:19Z"},"euvd":{"id":"EUVD-2018-0751","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-flavorjones-loofah-cve-2018-16468","packageHistory":[{"cve":"CVE-2018-8048","published":"2018-03-27","fixed":"2.2.1","kev":false,"link":{"from":"CVE-2018-8048","to":"CVE-2018-16468","relation":"successor","confidence":"medium","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"RubyGems:loofah","fromFixed":"2.2.1","toFixed":"2.2.3","daysApart":217},{"kind":"similar","provenance":"machine","score":0.36,"basis":"same package + description similarity"}]}},{"cve":"CVE-2018-16468","published":"2018-10-30","fixed":"2.2.3","kev":false},{"cve":"CVE-2019-15587","published":"2019-10-22","fixed":"2.3.1","kev":false,"link":{"from":"CVE-2018-16468","to":"CVE-2019-15587","relation":"successor","confidence":"medium","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"RubyGems:loofah","fromFixed":"2.2.3","toFixed":"2.3.1","daysApart":357},{"kind":"similar","provenance":"machine","score":1.0,"basis":"same package + description similarity"}]}},{"cve":"CVE-2022-23514","published":"2022-12-14","fixed":"2.19.1","kev":false},{"cve":"CVE-2022-23515","published":"2022-12-14","fixed":"2.19.1","kev":false}],"package":"RubyGems:loofah"}}