Cross-Site Scripting (XSS) in rails-html-sanitizer (CVE-2026-73648)
Summary
Cross-site scripting in rails-html-sanitizer (CVE-2026-73648). Risk of unauthorized operations or information disclosure. Exploitable via SVG_ALLOW_LOCAL_HREF. Mitigation: upgrade to 1.7.1 or later.
Original description
The description as published by the source.
Summary
There is a possible cross-site scripting vulnerability in rails-html-sanitizer when the sanitizer is configured to allow an SVG reference element such as ``. See related GHSA-9wjq-cp2p-hrgf in Loofah, whose SVG local-reference logic rails-html-sanitizer mirrors.
- Versions affected:
>= 1.0.3, < 1.7.1 - Not affected:
< 1.0.3 - Fixed versions:
1.7.1
Impact
Rails::HTML::PermitScrubber restricts SVG reference elements in the SVG_ALLOW_LOCAL_HREF collection to local, same-document references, but that restriction covered only the xlink:href attribute. Browsers also accept a plain href attribute per the SVG 2 spec, and it was not restricted, so those elements could reference arbitrary external documents. SVG can load and render external SVG content by reference, and if the referenced document is same-origin and contains scripts, it could execute in the context of the sanitized document. can load external images, which can be used for tracking.
Applications are impacted only when the allowed tags are overridden to include one of these SVG reference elements, for example or. The default allowed tags do not include these SVG elements, so applications using the default configuration are not affected.
Workarounds
Remove the SVG reference elements (such as use and feImage) from the overridden allowed tags. Applications using the default allowed tags are n…
Source: GitHub Security Advisories (Global) NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-73648 has been found in rails-html-sanitizer.
Attackers can target a specific entry point like SVG_ALLOW_LOCAL_HREF over the network to misuse the product.
Risk of unauthorized operations or information disclosure.
What to do: upgrade rails-html-sanitizer to 1.7.1 or later.
If unsure, ask your IT team or search "rails-html-sanitizer CVE-2026-73648" on the vendor's site.
CVE-2026-73648 (rails-html-sanitizer) — CWE-79
Attack surface: SVG_ALLOW_LOCAL_HREF / href / use / feImage
Patched: 1.7.1 — apply immediately
Workaround: Remove the SVG reference elements (such as use and feImage) from the overridden allowed tags.
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
Cross-site scripting (XSS) (CWE-79) exists in rails-html-sanitizer. Attackers reach the vulnerable code path via SVG_ALLOW_LOCAL_HREF.
Check the vendor advisory for the affected versions of rails-html-sanitizer. Attack surface: SVG_ALLOW_LOCAL_HREF / href / use / feImage.
Severity: ?. Risk of unauthorized operations or information disclosure.
Update to 1.7.1.
Workaround: Remove the SVG reference elements (such as use and feImage) from the overridden allowed tags.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'rails-html-sanitizer' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'rails-html-sanitizer' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
rails-html-sanitizerを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply temporary workaround mitigate
Remove the SVG reference elements (such as `use` and `feImage`) from the overridden allowed tags.パッチが適用されるまでの応急処置として、Remove the SVG reference elements (such as
useandfeImage) from the overridden allowed tags. を実施。回避策の副作用 (機能低下) を確認した上で。 -
3Apply patch patch
Upgrade rails-html-sanitizer to 1.7.1ステージング環境で 1.7.1 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
4Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
Fix status by distribution
Fixed packages published by each distribution for this CVE
- Debian DEBIAN-CVE-2026-73648 ruby-rails-html-sanitizer
- Ubuntu UBUNTU-CVE-2026-73648 ruby-rails-html-sanitizer