CVE-2026-73491
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.2, Loofah::HTML5::Scrub.allowed_uri? does not reject javascript: URIs whose scheme is split or prefixed with the HTML5 named whitespace character references 	 or 
. CGI.unescapeHTML leaves those references intact, so allowed_uri? reports the URL safe even though a browser decodes and strips the tab or line feed and executes the resulting javascript: URL. This issue affects only callers that pass HTML-encoded strings directly to allowed_uri?; Loofah's default sanitize() path is not affected. This issue is fixed in version 2.25.2.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
loofahRubyGems | >= 2.25.0, < 2.25.2 | 2.25.2 |
Affected products
17- Range: >=2.25.0,<2.25.2
- osv-coords16 versionspkg:apk/chainguard/gitlab-rails-ce-19.3pkg:apk/chainguard/gitlab-rails-ce-fips-19.3pkg:apk/chainguard/pgheropkg:apk/chainguard/pghero-fipspkg:apk/chainguard/ruby3.2-rails-7.2pkg:apk/chainguard/ruby3.2-rails-8.0pkg:apk/chainguard/ruby3.2-rails-8.1pkg:apk/chainguard/ruby3.3-rails-8.0pkg:apk/chainguard/ruby3.4-rails-7.2pkg:apk/chainguard/ruby3.4-rails-8.0pkg:apk/chainguard/ruby3.4-rails-8.1pkg:apk/chainguard/ruby4.0-rails-8.0pkg:apk/chainguard/ruby4.0-rails-8.1pkg:apk/wolfi/ruby3.2-rails-8.1pkg:apk/wolfi/ruby3.4-rails-8.1pkg:apk/wolfi/ruby4.0-rails-8.1
< 19.3.1-r6+ 15 more
- (no CPE)range: < 19.3.1-r6
- (no CPE)range: < 19.3.1-r3
- (no CPE)range: < 3.8.0-r4
- (no CPE)range: < 3.8.0-r4
- (no CPE)range: < 7.2.3.1-r8
- (no CPE)range: < 8.0.5-r7
- (no CPE)range: < 8.1.3-r9
- (no CPE)range: < 8.0.5-r10
- (no CPE)range: < 7.2.3.1-r10
- (no CPE)range: < 8.0.5-r7
- (no CPE)range: < 8.1.3-r11
- (no CPE)range: < 8.0.5-r6
- (no CPE)range: < 8.1.3-r10
- (no CPE)range: < 8.1.3-r9
- (no CPE)range: < 8.1.3-r11
- (no CPE)range: < 8.1.3-r10
Patches
Vulnerability mechanics
References
5- github.com/advisories/GHSA-8whx-365g-h9vvghsaADVISORY
- github.com/flavorjones/loofah/commit/5e91af861e3cdab47b91dd0b81f3afdfd13a5e19nvdWEB
- github.com/flavorjones/loofah/releases/tag/v2.25.2nvdWEB
- github.com/flavorjones/loofah/security/advisories/GHSA-8whx-365g-h9vvnvdWEB
- github.com/flavorjones/loofah/pull/308nvd
News mentions
0No linked articles in our index yet.