Cross-site scriptingin rails-html-sanitizer.
No public exploit found; not on exploited lists.
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.
- Upgrade rails-html-sanitizer (RubyGems) to 1.0.4 or later.
Affected and fixed versions
From the CVE record, NVD and package advisories. When no source has versions yet, this table says "not confirmed" instead of guessing.
From first report to first attacks
- 28 Dec 2017CVE ID reserved by hackerone.
- 30 Mar 2018Published in the CVE List.
- 5 Aug 2024CVE record last updated.
Attack code anyone can find
Exploit maturity: No public exploit found.
Listed so defenders can judge how urgent this is and test systems they are authorised to test. Patchminder does not host exploit code; links open the source page. Labels for GitHub repositories come from their public details and are never a promise about the code. Run anything only in an isolated lab.
Report a link
Nothing on this page links to exploit code right now. To report anything else, write to the contact point in the legal notice.
Other rails-html-sanitizer vulnerabilities
Same weakness: Cross-site scripting
- github.com x_refsource_CONFIRM
Patchminder. CVE-2018-3741: Cross-site scripting in rails-html-sanitizer. https://patchminder.com/cve/cve-2018-3741/ (accessed 5 December 2026).