CVE-2018-3741Cross-site Scripting in Rails Rails-html-sanitizer

CWE-79Cross-site Scripting12 documents7 sources
Severity
6.1MEDIUMNVD
OSV5.6
EPSS
0.1%
top 67.73%
CISA KEV
Not in KEV
Exploit
No known exploits
Timeline
PublishedMar 30
Latest updateJun 19

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.

CVSS vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:NExploitability: 2.8 | Impact: 2.7

Affected Packages5 packages

debiandebian/ruby-rails-html-sanitizer< ruby-rails-html-sanitizer 1.0.4-1 (bookworm)
RubyGemsrails/rails-html-sanitizer< 1.0.4
Ubuntulinux/linux_kernel< 3.13.0-156.206

Patches

🔴Vulnerability Details

5
OSV
linux regressions2018-08-17
OSV
linux-lts-xenial, linux-aws vulnerabilities2018-08-14
GHSA
rails-html-sanitizer Cross-site Scripting vulnerability2018-04-26
OSV
rails-html-sanitizer Cross-site Scripting vulnerability2018-04-26
OSV
CVE-2018-3741: There is a possible XSS vulnerability in all rails-html-sanitizer gem versions below 12018-03-30

📋Vendor Advisories

2
Red Hat
rubygem-rails-html-sanitizer: non-whitelisted attributes are present in sanitized output when input with specially-crafted HTML fragments leading to XSS vulnerability2018-03-21
Debian
CVE-2018-3741: ruby-rails-html-sanitizer - There is a possible XSS vulnerability in all rails-html-sanitizer gem versions b...2018

💬Community

4
Bugzilla
CVE-2020-4054 rubygem-rails-html-sanitizer: XSS via crafted input2020-06-19
Bugzilla
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 [fedora-all]2018-04-18
Bugzilla
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 vulnerability2018-04-18
HackerOne
XSS vulnerability in sanitize-method when parsing link's href2018-03-22