What’s Vulnerable › Vulnerabilities
CVE-2026-73648: rails-html-sanitizer: Possible XSS vulnerability with certain configurations
- Severity: medium (CVSS 5.1 v4.0)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.5% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2026-08-13 · updated 2026-10-24
- Weakness: CWE-79
Description
rails-html-sanitizer is responsible for sanitizing HTML fragments in Rails applications. From 1.0.3 until 1.7.1, Rails::HTML::PermitScrubber restricted SVG reference elements in SVG_ALLOW_LOCAL_HREF only when they used xlink:href, even though browsers also accept the plain href attribute. Applications with non-default allowed tags that included SVG use or feImage elements could therefore permit external references; a same-origin external SVG referenced by use could execute scripts in the sanitized document's context, while feImage could load external images for tracking. Applications using the default allowed tags are not affected. This issue is fixed in version 1.7.1.
Affected products
- Rubygems Rails-Html-Sanitizer: from 1.0.3 before 1.7.1; 1.0.3, 1.0.4, 1.1.0, 1.2.0, 1.3.0, 1.4.0 (+11) — fixed in 1.7.1
- rails-html-sanitizer: from 1.0.3, < 1.7.1
How to fix
Upgrade to a fixed version: Rubygems Rails-Html-Sanitizer 1.7.1. Check the vendor advisory for mitigations.
References
- https://github.com/rails/rails-html-sanitizer/commit/74dcb8053e6da9921246ce71b06ad9fd65b19586
- https://github.com/rails/rails-html-sanitizer/pull/223
- https://github.com/rails/rails-html-sanitizer/releases/tag/v1.7.1
- https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-cj75-f6xr-r4g7
Get alerted when CVE-2026-73648 or the next vulnerability affects your stack