CVE-2018-3741
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.
| Package | Ecosystem | Fixed in |
|---|---|---|
| rails-html-sanitizer | RubyGems | 1.0.4 |
| html_sanitizer | rubyonrails | 1.0.3 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Rails | rails-html-sanitizer | <= 1.0.3 |
| RubyGems | rails-html-sanitizer | 0 |
| Rails | rails-html-sanitizer | 0 |
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
References
- x_refsource_CONFIRM
- https://groups.google.com/d/msg/rubyonrails-security/tP7W3kLc5u4/uDy2Br7xBgAJ url