Skip to content
Fencer Vulns
medium 6.1

CVE-2018-3741 json

rails-html-sanitizer Cross-site Scripting vulnerability

published 2018-03-30 8 y ago modified 2026-06-17 4 mo ago also GHSA-px3r-jm9g-c8w8 , EUVD-2018-0191

cvss
6.1
version 3.1, NVD
cisa kev
Not listed
not in CISA's catalog
epss
1.3%
EPSS 1.3% chance of exploitation in 30 days, percentile 69%
public exploits
0
none known

Summary

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.

Patch / fix

  • rubygems rails-html-sanitizer 1.0.4
  • ruby-rails-html-sanitizer Debian 14, Debian 13, Debian 12 1.0.4-1

debian advisories DEBIAN-CVE-2018-3741

  • wmi cloudforms managementengine 5.10 1.3.14-7.el7cf
  • cfme cloudforms managementengine 5.10 5.10.0.33-1.el7cf
  • ruby cloudforms managementengine 5.10 2.4.5-90.el7cf
  • smem cloudforms managementengine 5.10 1.4-1.el7cf
  • nginx cloudforms managementengine 5.10 1:1.10.2-1.el7at
  • erlang cloudforms managementengine 5.10 19.3.6.7-1.el7at
  • prince cloudforms managementengine 5.10 9.0r2-10.el7cf
  • wxGTK3 cloudforms managementengine 5.10 3.0.3-5.el7at

red hat advisories RHSA-2019:0212

  • rubygem-rails-html-sanitizer OpenStack Cloud Crowbar 9, OpenStack Cloud Crowbar 8, OpenStack Cloud 7 +1 more 1.0.3-8.8.1

suse advisories SUSE-SU-2019:2182-1

  • rubygem-rails-html-sanitizer openSUSE Tumbleweed 1.6.0-1.9
  • rubygem-rails-html-sanitizer openSUSE Tumbleweed 1.6.0-1.7
  • rubygem-rails-html-sanitizer openSUSE Tumbleweed 1.6.0-1.5
  • rubygem-rails-html-sanitizer openSUSE Tumbleweed 1.4.3-1.1
  • ruby3.2-rubygem-rails-html-sanitizer openSUSE Tumbleweed 1.5.0-2.1

opensuse advisories openSUSE-SU-2026:10361-1openSUSE-SU-2025:15125-1openSUSE-SU-2024:14175-1openSUSE-SU-2024:12145-1openSUSE-SU-2024:13137-1

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2018-3741 updated cvss 6.1

rubygem-rails-html-sanitizer: non-whitelisted attributes are present in sanitized output when input with specially-crafted HTML fragments leading to XSS vulnerability

  • Red Hat Software Collections rh-ror42-rubygem-rails-html-sanitizer, rh-ror50-rubygem-rails-html-sanitizer
    affected: no fix planned “Will not fix”
  • Red Hat CloudForms Management Engine 5.10 smem 1.4-1.el7cf, wmi 1.3.14-7.el7cf, ruby 2.4.5-90.el7cf, nginx 1.10.2-1.el7at, wxGTK3 3.0.3-5.el7at, prince 9.0r2-10.el7cf, +179 more
    fixed: vendor fix RHSA-2019:0212

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

1.25% chance of exploitation in the next 30 days, higher than 69% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
NVD 3.1 6.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
NVD 2.0 4.3 AV:N/AC:M/Au:N/C:N/I:P/A:N
GitHub 3.1 6.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Affected packages

ecosystem package affected fixed in
rubygems rails-html-sanitizer
<1.0.4
1.0.4

Affected products

  • Rails rails-html-sanitizer

Classification

Weakness
  • CWE-79 Improper Neutralization of Input During Web Page Generation
Technology feeds

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.