VDB

CVE-2018-3741

CVE-2018-3741 PUBLISHED CVSS 6.099999904632568 MEDIUM

rails-html-sanitizer Cross-site Scripting vulnerability

Reported by hackerone · Published March 30, 2018

rails-html-sanitizer is fixed in 1.0.4 (RubyGems)

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
rails-html-sanitizerRubyGems1.0.4
html_sanitizerrubyonrails1.0.3

Risk scores

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

Affected products

VendorProductVersions
Railsrails-html-sanitizer<= 1.0.3
RubyGemsrails-html-sanitizer0
Railsrails-html-sanitizer0

Timeline

  • Mar 22, 2018 PoC Published
  • Mar 30, 2018 CVE Published
  • Apr 14, 2021 EPSS Score (30 in total, the first dated here)
  • Jun 1, 2026 Security Advisory (2 in total, the first dated here)
  • Sep 20, 2026 Coalition ESS Score

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2018-3741
vulnetix vdb fixes CVE-2018-3741

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2018-3741/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›