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.
Published: 2026-08-13
Score: 5.1 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

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.

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

Remediation

No vendor fix or workaround currently provided.

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

Sat, 15 Aug 2026 00:15:00 +0000

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


Fri, 14 Aug 2026 10:15:00 +0000

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

Thu, 13 Aug 2026 19:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Thu, 13 Aug 2026 18:15:00 +0000

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'}


Subscriptions

Rubyonrails Rails Html Sanitizers
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-13T18:35:10.270Z

Reserved: 2026-08-13T14:04:09.604Z

Link: CVE-2026-73648

cve-icon Vulnrichment

Updated: 2026-08-13T18:34:22.614Z

cve-icon NVD

Status : Received

Published: 2026-08-13T18:18:20.620

Modified: 2026-08-13T19:17:37.707

Link: CVE-2026-73648

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-08-13T18:00:21Z

Links: CVE-2026-73648 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-14T10:00:03Z

Weaknesses
  • CWE-79

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