CVE-2026-126206
Loofah allowed_uri? treats data:text/html as safe text/plain
Loofah is a general library for manipulating and transforming HTML/XML documents and fragments, built on top of Nokogiri. In 2.25.2, Loofah::HTML5::Scrub.allowed_uri? treats a data URI mediatype containing the HTML5 named solidus reference / as malformed and falls back to the allowed text/plain, while a browser decodes the reference and interprets the same value as text/html. An application that validates a user-controlled URL with this helper and renders the approved value in href or another browser-interpreted URI attribute can allow cross-site scripting. Rails::HTML::Sanitizer.allowed_uri? re-exports the affected helper. Loofah's default sanitize() path is not affected because Nokogiri decodes the entity before URI validation. This issue is fixed in version 2.25.3.
Fixes and workarounds
Fix
loofah (RubyGems): OSV reports a fixed version 2.25.3. Check the advisory for supported release branches.
Source: OSV GHSA-jcff-cj73-4w4fAffected products and versions
| Product | Versions | Authority |
|---|---|---|
| loofah flavorjones |
= 2.25.2 (affected) | CNA: GitHub_M |
loofahloofah
RubyGems |
2.25.2 (affected, RubyGems) Ecosystem version events: introduced 2.25.2; fixed 2.25.3 Source events (ECOSYSTEM)
Other versions: unaffected |
OSV GHSA-jcff-cj73-4w4f |
Version ranges are source assertions. Check the vendor advisory and your installed configuration before determining exposure.
CVSS assessments
| Version / score | Vector | Authority |
|---|---|---|
| 4.0 / 5.3 medium |
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 | CNA: GitHub_M |
Exploit evidence
No exploit evidence in collected sources. This is not proof of no exploitation.
References
- https://github.com/flavorjones/loofah/security/advisories/GHSA-jcff-cj73-4w4fCNA: GitHub_M · x_refsource_CONFIRM
- https://github.com/flavorjones/loofah/pull/324CNA: GitHub_M · x_refsource_MISC
- https://github.com/flavorjones/loofah/commit/ad92002966053309f83b550861e2ef04bc714744CNA: GitHub_M · x_refsource_MISC
- https://github.com/flavorjones/loofah/releases/tag/v2.25.3CNA: GitHub_M · x_refsource_MISC
- https://github.com/advisories/GHSA-jcff-cj73-4w4fOSV / GitHub Security Advisories · advisory
- https://osv.dev/vulnerability/GHSA-jcff-cj73-4w4fOSV / GitHub Security Advisories · osv
For agents and automation
Read public disclosures for free as Markdown or JSON. Compatible browsers also expose native WebMCP tools to search disclosures, read this page, and discover API access.
Use the ontology-linked Cyber API with x402 pay per request, or a Y2 Pro or Elite API key with the intel:cyber scope.
Endpoints and access details
https://api.y2.dev/api/v2/cyber/cveshttps://api.y2.dev/api/v2/cyber/cves/{cveId}
A workspace owner or admin can create a Pro or Elite API key. Send Authorization: Bearer <Y2_API_KEY> from your trusted agent runtime.
For x402, omit Authorization and read the HTTP 402 payment challenge before signing a retry. Public browser tools do not make payments.