{"cve":"CVE-2018-3741","nvd":{"published":"2018-03-30T19:29:00.333","modified":"2026-06-17T01:57:45.283","status":"Modified","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_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1},"cwes":["CWE-79"],"references":["https://github.com/rails/rails-html-sanitizer/commit/f3ba1a839a35f2ba7f941c15e239a1cb379d56ae","https://github.com/rails/rails-html-sanitizer/commit/f3ba1a839a35f2ba7f941c15e239a1cb379d56ae"],"products":["rubyonrails:html_sanitizer"],"source":"nvd","synced_at":"2026-10-19T20:49:59.483420567+00:00"},"epss":{"cve":"CVE-2018-3741","score":0.01253,"percentile":0.69455,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-px3r-jm9g-c8w8","url":"https://osv.dev/vulnerability/GHSA-px3r-jm9g-c8w8","summary":"rails-html-sanitizer Cross-site Scripting vulnerability","modified":"2023-11-08T04:00:18.344915Z","packages":[{"ecosystem":"RubyGems","name":"rails-html-sanitizer","purl":"pkg:gem/rails-html-sanitizer","ranges":["<1.0.4"],"fixed":["1.0.4"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}