CVE-2026-73648

rails-html-sanitizer: Possible XSS vulnerability with certain configurations

Published Aug 13, 2026 CVSS 4.0 · 5.1 Medium EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

Rails::HTML::PermitScrubber, used to sanitize HTML fragments in Rails applications, fails to block SVG elements that use the plain href attribute; only xlink:href was restricted. This weakness, identified as CWE‑79, allows injection of external SVG resources that can execute scripts in the context of the sanitized document or enable tracking via external images. The result is a cross‑site scripting vulnerability where malicious input can run client‑side code or transmit data to an attacker. The vulnerability can affect confidentiality, integrity, and availability of the application’s front‑end if user input is rendered after sanitization.

Affected Systems

Any Rails application employing the rails‑html‑sanitizer library between versions 1.0.3 and 1.7.0 – inclusive – and using non‑default allowed tags that include SVG elements such as <use> or <feImage>. Applications that rely on the default allowed tags list do not fall under the affected range. The fix is released in version 1.7.1, which removes the oversight.

Risk and Exploitability

The CVSS score of 5.1 classifies this issue as medium severity. EPSS is not available, and the vulnerability is not listed in the CISA KEV catalog. The likely attack vector is through crafted user‑generated content that the application sanitizes, then renders in a browser. An attacker who can inject such content may trigger execution of arbitrary JavaScript or cause exfiltration of data via external image loads. While the vulnerability is not a denial‑of‑service flaw, its potential to compromise client‑side code can lead to wider compromises in the application context.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade rails-html-sanitizer to version 1.7.1 or later
  • If upgrade is delayed, manually remove SVG and feImage tags from the allowed tags list and enforce a stricter whitelist
  • Configure the sanitization process to block external SVG references by ensuring that only safe attributes are accepted or by disabling cross‑origin access

Generated by OpenCVE AI on August 13, 2026 at 19:40 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-cj75-f6xr-r4g7 Rails HTML Sanitizers: Possible XSS vulnerability with certain configurations
History
Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 5.4, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N'}

threat_severity

Moderate

Type Values Removed Values Added
First Time appeared Rubyonrails
Rubyonrails rails Html Sanitizers
Vendors & Products Rubyonrails
Rubyonrails rails Html Sanitizers
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Title rails-html-sanitizer: Possible XSS vulnerability with certain configurations
Weaknesses CWE-79
References
Metrics cvssV4_0

{'score': 5.1, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N'}

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Aug 13, 2026, 6:35 PM
Reserved
Aug 13, 2026, 2:04 PM
Status
Awaiting Analysis
Published
Aug 13, 2026, 6:18 PM
Modified
Oct 24, 2026, 3:10 PM
Severity
Moderate
Public date
Aug 13, 2026, 6:00 PM