{"id":"CVE-2026-126209","published":"2026-11-12T21:01:58Z","modified":"2026-11-16T19:30:53Z","title":"Loofah allowed_uri? treats javascript&#x3a alert(1) as safe","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. From 2.25.0 until 2.25.3, Loofah::HTML5::Scrub.allowed_uri? strips whitespace and control characters before decoding a semicolon-less numeric character reference, changing where the reference ends and hiding a javascript: or vbscript: scheme that a browser reconstructs. The bypass applies to encoded colons and encoded scheme letters when a stripped character terminates the numeric reference. An application that renders the approved value in href or another browser-interpreted URI attribute can allow cross-site scripting, and Rails::HTML::Sanitizer.allowed_uri? re-exports the affected helper. Loofah's default sanitize() path is not affected because Nokogiri decodes entities before URI evaluation. This issue is fixed in version 2.25.3.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.3,"severity":"MEDIUM","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00414,"percentile":0.36578,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"},{"id":"CWE-184","name":"Incomplete List of Disallowed Inputs"}],"references":[{"url":"https://github.com/flavorjones/loofah/security/advisories/GHSA-p9wj-w8xq-vjx6","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/flavorjones/loofah/pull/324","tags":["x_refsource_MISC"]},{"url":"https://github.com/flavorjones/loofah/commit/62c04841e8252a1b5373afcd2b89fb9b8279e317","tags":["x_refsource_MISC"]},{"url":"https://github.com/flavorjones/loofah/releases/tag/v2.25.3","tags":["x_refsource_MISC"]}],"priority":{"score":11.0,"factors":[{"name":"EPSS percentile","points":7.32},{"name":"CVSS severity","points":3.71}]},"vendorSlug":"flavorjones","affectedVersions":[{"vendor":"flavorjones","product":"loofah","versions":[">= 2.25.0, < 2.25.3"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-11-16T19:30:35.650536Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"RubyGems","package":"loofah","vulnerableRanges":[">=2.25.0, <2.25.3"],"patched":["2.25.3"],"from":["GHSA-p9wj-w8xq-vjx6"],"provenance":"source"}],"euvd":{"id":"EUVD-2026-124716","exploited":false,"provenance":"source"}}