CVE-2026-73648: Rails HTML Sanitizers · Possible XSS vulnerability with certain configurations
Affects rails-html-sanitizerSource GCVE Database
Mentioned vulnerabilities
CVSS 5.1 Medium : upgrade to 1.7.1 when convenient.
Data as of 26 Oct 2026, 16:10 UTC
- Patch
- Available – fixed in 1.7.1
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:NWhat to do
Upgrade rails-html-sanitizer to 1.7.1.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| RubyGemsrails-html-sanitizer | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Upgrade rails-html-sanitizer to version 1.7.1 or later where this issue is fixed. Alternatively, do not override the default allowed tags to include SVG reference elements such as <use> or <feImage>. Applications using the default sanitizer configuration are not affected and require no action.
Description
A possible cross-site scripting (XSS) vulnerability exists in rails-html-sanitizer versions 1.0.3 through before 1.7.1 when configured to allow certain SVG reference elements such as <use> or <feImage>. The vulnerability arises because the sanitizer restricts local references only on the xlink:href attribute but not on the plain href attribute, which browsers accept per the SVG 2 specification. This can allow external SVG content or images to be loaded and potentially execute scripts in the context of the sanitized document. Applications using the default sanitizer configuration are not affected because these SVG elements are not allowed by default.
References
- github.com/rails/rails-html-sanitizer/security/advisories/GHSA-cj75-f6xr-r4g7 (opens in a new tab)
- github.com/rails/rails-html-sanitizer/commit/74dcb8053e6da9921246ce71b06ad9fd65b19586 (opens in a new tab)
- github.com/rails/rails-html-sanitizer (opens in a new tab)
- github.com/rails/rails-html-sanitizer/releases/tag/v1.7.1 (opens in a new tab)