CVE-2018-3741

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.

Severity
MEDIUM
CVSS v3
6.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N · source nvd
Exploit chance (EPSS)
1.253%
chance of exploitation in the next 30 days
higher than 70% of scored CVEs · 2026-11-17
CISA KEV
Not listed
Public exploit code
None public
Exploit references (NVD and CNA): 0
Metasploit modules: 0
Nuclei templates: 0

Weakness

Timeline

  1. 2018-03-30Published by the CNA19:00 UTC
  2. 2018-04-26GitHub advisory published (GHSA-px3r-jm9g-c8w8)27 days after publication

The timeline shows what already happened. To be told when this CVE changes next, watch it from the API.

Exploit and advisory records

GitHub advisory GHSA-px3r-jm9g-c8w8, affected packages:

PackageVulnerable versionsFixed in
RubyGems rails-html-sanitizerbefore 1.0.41.0.4

Affected products

Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.

ProductVulnerable versionsFixed in
rubyonrails html_sanitizerthrough 1.0.3no fix listednot listed

Products and versions as NVD and the vendor that published the CVE list them.

References

Get more CVE data from the API.

Free without a key or signup. Pro adds monitoring and higher limits: pricing.

Sources