{"id":"CVE-2026-126203","aliases":["GHSA-h6v6-rg66-fqj4"],"title":"Loofah: Mutation XSS in the HTML5 scrubbers through unescaped attribute values","titleSource":"GitHub_M","descriptionSource":"OSV","declaredSeverity":"MODERATE","description":"## Summary\n\nLoofah's HTML5 scrubbers could emit output that a browser parses into different markup, allowing mutation XSS. Nokogiri < 1.19.5 did not escape `<` and `>` in attribute values. When the output contained certain MathML, a browser treated markup inside an allowed attribute as live HTML. The `:strip` scrubber is affected in every browser. The `:prune` and `:escape` scrubbers are affected in WebKit browsers such as Safari.\n\nNokogiri 1.19.5 escapes `<` and `>` in attribute values, as the HTML standard requires. Loofah 2.25.3 requires Nokogiri >= 1.19.5.\n\n## Impact\n\nApplications that sanitize untrusted HTML with Loofah's HTML5 API (`Loofah.html5_fragment`, `Loofah.html5_document` and the `scrub_html5_*` methods) and display the result to other people are affected, including with the default allowlist.\n\nNot affected: Loofah's HTML4 API (including `Loofah::Helpers.sanitize`), the `:whitewash` scrubber, rails-html-sanitizer's default configuration, and JRuby.\n\n## Mitigation\n\nUpgrade to Loofah >= 2.25.3, or upgrade Nokogiri to >= 1.19.5.","severity":"medium","score":6.1,"published":"2026-11-12T18:06:34.560Z","modified":"2026-11-12T21:00:03.784Z","withdrawn":false,"knownExploited":false,"affected":[{"ecosystem":"RubyGems","name":"loofah","sources":[{"name":"OSV · GHSA-h6v6-rg66-fqj4","url":"https://osv.dev/vulnerability/GHSA-h6v6-rg66-fqj4"}],"ranges":[{"events":[{"introduced":"2.21.0"},{"fixed":"2.25.3"}],"type":"ECOSYSTEM"}],"versions":["2.21.0","2.21.1","2.21.2","2.21.3","2.21.4","2.22.0","2.23.0","2.23.1","2.24.0","2.24.1","2.25.0","2.25.1","2.25.2"],"fixed":["2.25.3"]}],"sourceAffected":[],"references":["https://github.com/flavorjones/loofah/security/advisories/GHSA-h6v6-rg66-fqj4","https://github.com/flavorjones/loofah/pull/324","https://github.com/sparklemotion/nokogiri/pull/3741","https://github.com/flavorjones/loofah/commit/7ba1e7b77e043fb7dc832ef746fcbf83137135e6","https://github.com/sparklemotion/nokogiri/commit/635abc8d65c75d594ddf8957fbfbfd822c2c0dbd","https://github.com/flavorjones/loofah/releases/tag/v2.25.3","https://github.com/sparklemotion/nokogiri/releases/tag/v1.19.5","https://github.com/flavorjones/loofah","https://github.com/rubysec/ruby-advisory-db/blob/master/gems/loofah/GHSA-h6v6-rg66-fqj4.yml"],"sources":[{"name":"CVE","id":"CVE-2026-126203","modified":"2026-11-12T19:28:45.309Z","url":"https://www.cve.org/CVERecord?id=CVE-2026-126203"},{"name":"OSV","id":"GHSA-h6v6-rg66-fqj4","modified":"2026-11-12T21:00:03.784161248Z","url":"https://osv.dev/vulnerability/GHSA-h6v6-rg66-fqj4"}],"assessments":[{"source":"GitHub_M","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1},{"source":"OSV","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1}],"cve":{"records":[{"id":"CVE-2026-126203","source":"GitHub_M","state":"PUBLISHED","reasons":[],"replacements":[],"disputed":false,"unsupportedWhenAssigned":false,"reserved":"2026-11-10T20:07:44.958Z","published":"2026-11-12T18:06:34.560Z","modified":"2026-11-12T19:28:45.309Z"}],"publishers":[{"name":"GitHub_M","role":"CNA","organizationId":"a0819718-46f1-4df5-94e2-005712e83aaa","modified":"2026-11-12T18:06:34.560Z"},{"name":"CISA-ADP","role":"ADP","organizationId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","modified":"2026-11-12T19:28:45.309Z"}],"references":[{"url":"https://github.com/flavorjones/loofah/security/advisories/GHSA-h6v6-rg66-fqj4","tags":["x_refsource_CONFIRM"],"source":"GitHub_M"},{"url":"https://github.com/flavorjones/loofah/pull/324","tags":["x_refsource_MISC"],"source":"GitHub_M"},{"url":"https://github.com/sparklemotion/nokogiri/pull/3741","tags":["x_refsource_MISC"],"source":"GitHub_M"},{"url":"https://github.com/flavorjones/loofah/commit/7ba1e7b77e043fb7dc832ef746fcbf83137135e6","tags":["x_refsource_MISC"],"source":"GitHub_M"},{"url":"https://github.com/sparklemotion/nokogiri/commit/635abc8d65c75d594ddf8957fbfbfd822c2c0dbd","tags":["x_refsource_MISC"],"source":"GitHub_M"},{"url":"https://github.com/flavorjones/loofah/releases/tag/v2.25.3","tags":["x_refsource_MISC"],"source":"GitHub_M"},{"url":"https://github.com/sparklemotion/nokogiri/releases/tag/v1.19.5","tags":["x_refsource_MISC"],"source":"GitHub_M"}],"weaknesses":[{"id":"CWE-79","description":"CWE-79: Improper Neutralization of Input During Web Page Generation","source":"GitHub_M"},{"id":"CWE-116","description":"CWE-116: Improper Encoding or Escaping of Output","source":"GitHub_M"}],"applicability":[],"prioritization":[{"source":"CISA-ADP","type":"SSVC","role":"CISA Coordinator","timestamp":"2026-11-12T19:20:09.567928Z","decisions":[{"name":"Exploitation","value":"none"},{"name":"Automatable","value":"no"},{"name":"Technical Impact","value":"partial"}]}]},"products":[{"vendor":"flavorjones","name":"loofah","platforms":[],"versions":[{"version":">= 2.21.0, < 2.25.3","status":"affected"}],"cpes":[],"source":"GitHub_M","url":"https://www.cve.org/CVERecord?id=CVE-2026-126203"}],"remediation":[],"observedAt":"2026-11-12T22:36:54.910Z","kev":{"status":"not-listed","checkedAt":"2026-11-16T04:05:32.034Z"},"coverage":[{"source":"NVD","status":"refresh-failed","attemptedAt":"2026-11-12T19:45:31.982Z"},{"source":"GHSA","status":"no-result","checkedAt":"2026-11-12T19:45:33.279Z","attemptedAt":"2026-11-12T19:45:33.279Z"},{"source":"EUVD","status":"available","checkedAt":"2026-11-12T19:45:33.279Z","attemptedAt":"2026-11-12T19:45:33.279Z"},{"source":"EPSS","status":"no-result","checkedAt":"2026-11-12T19:45:33.279Z","attemptedAt":"2026-11-12T19:45:33.279Z"}],"evidence":[{"source":"ENISA EUVD","id":"EUVD-2026-124615","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-124615","modified":"Nov 12, 2026, 6:06:34 PM","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","checkedAt":"2026-11-12T19:45:33.279Z"}],"aiSummary":{"text":"Loofah's HTML5 scrubbers in versions 2.21.0 to 2.25.2 could allow mutation XSS through unescaped attribute values. The vulnerability affects applications that sanitize untrusted HTML with Loofah's HTML5 API. Upgrade to Loofah 2.25.3 or Nokogiri 1.19.5 to mitigate.","model":"@cf/meta/llama-3.3-70b-instruct-fp8-fast","generatedAt":"2026-11-13T04:26:16.025Z","sources":[{"name":"CVE","url":"https://www.cve.org/CVERecord?id=CVE-2026-126203"},{"name":"OSV","url":"https://osv.dev/vulnerability/GHSA-h6v6-rg66-fqj4"}]}}