Breaking News: Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret
Read the Report
Learn How MCP Is Bypassing a Decade of Cloud Security Best Practices
Read the Report
Are you exposed? Connect a repo in minutes.
Scan your repos free

CVE-2018-3741

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

Overview

Published
30 Mar 2018
Modified
17 Jun 2026
Medium CVE
1 Registry packages
213 OS packages
4 Linux distributions
Yes Fix available

Description

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.

Source: OX vulnerability database

Severity

6.1 · MEDIUM

CVSS 3.1 base score, scored by NVD.

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Weakness: CWE-79

Affected packages · 1

Packages affected by CVE-2018-3741
EcosystemPackageVulnerableFixed in
RubyGems rails-html-sanitizer <1.0.4 1.0.4

Open a package to see all its vulnerabilities.

Operating systems · 94 fixes

Red Hat 1 release · 82 packages

wont fix 1 fixed 81
rh-ror42-rubygem-rails-html-sanitizer rubygem-unf-ext rubygem-memory-buffer rubygem-net-telnet bubblewrap python2-future +76
Red Hat fixes for CVE-2018-3741
ReleasePackageFixed inAdvisory
7 rh-ror42-rubygem-rails-html-sanitizer +3 wont fix —
7 rubygem-unf-ext +1 0:0.0.7.5-1.el7cf RHSA-2019:0212
7 rubygem-memory-buffer +1 0:0.1.0-2.el7cf RHSA-2019:0212
7 rubygem-net-telnet 0:0.1.1-90.el7cf RHSA-2019:0212
7 bubblewrap 0:0.1.7-1.el7 RHSA-2019:0212
7 python2-future 0:0.16.0-1.el7cf RHSA-2019:0212

76 more rows

debian 5 releases · 1 package

fixed 4 affected 1
ruby-rails-html-sanitizer
debian fixes for CVE-2018-3741
ReleasePackageFixed in
11 ruby-rails-html-sanitizer 1.0.4-1
12 ruby-rails-html-sanitizer 1.0.4-1
13 ruby-rails-html-sanitizer 1.0.4-1
14 ruby-rails-html-sanitizer 1.0.4-1
9 ruby-rails-html-sanitizer affected

echo 1 release · 1 package

fixed 1
ruby-rails-html-sanitizer
echo fixes for CVE-2018-3741
ReleasePackageFixed in
ruby-rails-html-sanitizer 1.0.4-1

openSUSE 1 release · 6 packages

fixed 6
ruby2-7-rubygem-rails-html-sanitizer ruby3-1-rubygem-rails-html-sanitizer ruby3-2-rubygem-rails-html-sanitizer ruby3-3-rubygem-rails-html-sanitizer ruby3-4-rubygem-rails-html-sanitizer ruby4-0-rubygem-rails-html-sanitizer
openSUSE fixes for CVE-2018-3741
ReleasePackageFixed inAdvisory
Tumbleweed ruby2-7-rubygem-rails-html-sanitizer +1 1.4.2-1.2 openSUSE-SU-2024:11349-1
Tumbleweed ruby3-1-rubygem-rails-html-sanitizer 1.4.3-1.1 openSUSE-SU-2024:12145-1
Tumbleweed ruby3-2-rubygem-rails-html-sanitizer 1.5.0-2.1 openSUSE-SU-2024:13137-1
Tumbleweed ruby3-3-rubygem-rails-html-sanitizer 1.6.0-1.5 openSUSE-SU-2024:14175-1
Tumbleweed ruby3-4-rubygem-rails-html-sanitizer 1.6.0-1.7 openSUSE-SU-2025:15125-1
Tumbleweed ruby4-0-rubygem-rails-html-sanitizer 1.6.0-1.9 openSUSE-SU-2026:10361-1

References

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.