{"answers":{"affected":"1 open source package ship an affected version, including loofah.","exploited":"There is no known exploitation of CVE-2026-126209 in the wild and no public exploit code.","exposure":"An affected version is only exploitable if your software calls Loofah::HTML5::Scrub.allowed_uri? or Rails::HTML::Sanitizer.allowed_uri?. Many projects that include it are not exposed.","fix":"Upgrade loofah to 2.25.3 or later.","what":"CVE-2026-126209 is a medium-severity cross-site scripting vulnerability in flavorjones loofah, published on 12 Nov 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2026-126209 and fix it if it is affected.\n\nWhat it is: CVE-2026-126209 is a medium-severity cross-site scripting vulnerability in flavorjones loofah, published on 12 Nov 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2026-126209 in the wild and no public exploit code.\nExposure: An affected version is only exploitable if your software calls Loofah::HTML5::Scrub.allowed_uri? or Rails::HTML::Sanitizer.allowed_uri?. Many projects that include it are not exposed.\n\nAffected packages and fixed versions:\n- loofah (RubyGems): affected from 2.25.0; fixed in 2.25.3\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.\n   If an affected version is present, also search the code for calls to Loofah::HTML5::Scrub.allowed_uri? or Rails::HTML::Sanitizer.allowed_uri? and report whether any exist.\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-2026-126209/ (Markdown: https://insights.sbomify.com/CVE-2026-126209/index.md)","id":"CVE-2026-126209","markdown":"https://insights.sbomify.com/CVE-2026-126209/index.md","name":"CVE-2026-126209","record":{"aliases":["GHSA-p9wj-w8xq-vjx6"],"analysis":{"component_type":"library","exploitable_when_present":false,"fix_type":"upgrade","impacts":["security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"Ruby HTML sanitizer","requires_auth":"none","requires_specific_call":true,"summary":"Attackers can bypass Loofah's URI sanitizer with encoded colons and scheme letters to enable javascript: links in Rails apps rendering approved values.","user_interaction":"required","vuln_class":"xss","vulnerable_functions":["Loofah::HTML5::Scrub.allowed_uri?","Rails::HTML::Sanitizer.allowed_uri?"]},"analysis_generated_by":"sbomify/insights-2b-fp8","assigner":"GitHub_M","cpe":[],"cvss":{"score":5.3,"severity":"medium","source":"cna","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","version":"4.0"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"},{"id":"CWE-184","name":"Incomplete List of Disallowed Inputs"}],"description":"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.","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":"Loofah allowed_uri? treats javascript: alert(1) as safe","id":"CVE-2026-126209","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"RubyGems","product":null,"products":[],"type":"xss","year":"2026"},"n_packages":1,"n_references":4,"next":{"headline":"@hono/node-server: Backslash in the request path is parsed as a path separator, bypassing path-based access control at a reverse proxy","id":"CVE-2026-126210"},"nickname":null,"packages":[{"ecosystem":"RubyGems","fixed":["2.25.3"],"introduced":["2.25.0"],"last_affected":[],"package":"loofah","purl":null,"source":"GHSA-p9wj-w8xq-vjx6"}],"prev":{"headline":"Loofah: SVG `\u003ctextPath\u003e` and `\u003cmpath\u003e` bypass local-reference restriction","id":"CVE-2026-126208"},"products":["loofah"],"published":"2026-11-12","related":[],"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":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2026-11-12","vendors":["flavorjones"]},"summary":"Attackers can bypass Loofah's URI sanitizer with encoded colons and scheme letters to enable javascript: links in Rails apps rendering approved values.","url":"https://insights.sbomify.com/CVE-2026-126209/"}