Cross-site Scripting (XSS) Affecting ruby-rails-html-sanitizer package, versions <1.0.4-1


Severity

Recommended
0.0
medium
0
10

Snyk's Security Team recommends NVD's CVSS assessment. Learn more

Threat Intelligence

EPSS
1.26% (67th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-ECHOLATEST-RUBYRAILSHTMLSANITIZER-18767117
  • published14 Aug 2026
  • disclosed30 Mar 2018

Introduced: 30 Mar 2018

CVE-2018-3741  (opens in a new tab)
CWE-79  (opens in a new tab)

How to fix?

Upgrade Echo:latest ruby-rails-html-sanitizer to version 1.0.4-1 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream ruby-rails-html-sanitizer package and not the ruby-rails-html-sanitizer package as distributed by Echo. See How to fix? for Echo:latest relevant fixed versions and status.

There is a possible XSS vulnerability in all rails-html-sanitizer gem versions below 1.0.4 for Ruby. The gem allows non-whitelisted attributes to be present in sanitized output when input with specially-crafted HTML fragments, and these attributes can lead to an XSS attack on target applications. This issue is similar to CVE-2018-8048 in Loofah. All users running an affected release should either upgrade or use one of the workarounds immediately.

CVSS Base Scores

version 3.1