{"schemaVersion":3,"id":"CVE-2018-3741","aliases":["SUSE-SU-2019:2182-1","UBUNTU-CVE-2018-3741","DEBIAN-CVE-2018-3741","GHSA-px3r-jm9g-c8w8"],"status":"published","duplicateOf":null,"title":null,"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.","dates":{"published":"2018-03-30T19:00:00.000Z","modified":"2024-08-05T04:50:30.644Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":6.1,"severity":"medium","version":"3.1","versionLabel":"v3.1","source":"NVD","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":6.1,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","exploitability":null,"impact":null,"computed":false},{"version":"2.0","versionLabel":"v2.0","source":"NVD","score":4.3,"severity":"medium","vector":"AV:N/AC:M/Au:N/C:N/I:P/A:N","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Ubuntu","score":6.1,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","exploitability":7.2,"impact":4.5,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Debian","score":6.1,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","exploitability":7.2,"impact":4.5,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Rubygems","score":6.1,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","exploitability":7.2,"impact":4.5,"computed":true}]},"epss":{"probability":0.01253,"percentile":0.69016,"severity":"low","asOf":"2026-10-19T00:00:00.000Z","change":{"pp":0,"baselineDate":"2026-09-19T00:00:00.000Z","baselineScore":0.01253},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.01253,"percentile":0.69016}],"last30":[{"date":"2026-09-19T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.01253,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.01253,"percentile":0.69016}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')","description":"The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.","type":"weakness","status":"Stable","abstraction":"Base","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/79.html"}],"affected":[{"vendor":"debian","product":"ruby-rails-html-sanitizer","name":"ruby-rails-html-sanitizer","label":"ruby-rails-html-sanitizer","ecosystem":"Debian","cpePart":null,"purl":"pkg:deb/debian/ruby-rails-html-sanitizer","purlType":"deb","versions":[{"text":"< 1.0.4-1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.0.4-1","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"ruby-rails-html-sanitizer","name":"ruby-rails-html-sanitizer","label":"ruby-rails-html-sanitizer","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/ruby-rails-html-sanitizer","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"RubyGems","product":"rails-html-sanitizer","name":"rails-html-sanitizer","label":"rails-html-sanitizer","ecosystem":"RubyGems","cpePart":null,"purl":"pkg:gem/rails-html-sanitizer","purlType":"gem","versions":[{"text":"< 1.0.4","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.0.4","eol":null,"hubHref":null},{"vendor":"rails","product":"rails-html-sanitizer","name":"rails-html-sanitizer","label":"rails-html-sanitizer","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≤ 1.0.3","noFixRecorded":false,"fixedIn":null}],"versionsText":"≤ 1.0.3","eol":null,"hubHref":"/vendor/rails/rails-html-sanitizer"},{"vendor":"suse","product":"rubygem-rails-html-sanitizer&distro=SUSE Enterprise Storage 4","name":"rubygem-rails-html-sanitizer","label":"rubygem-rails-html-sanitizer&distro=SUSE Enterprise Storage 4","ecosystem":"SUSE Linux Enterprise","cpePart":null,"purl":"pkg:rpm/suse/rubygem-rails-html-sanitizer&distro=SUSE Enterprise Storage 4","purlType":"rpm","versions":[{"text":"< 1.0.3-8.8.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.0.3-8.8.1","eol":null,"hubHref":null},{"vendor":"suse","product":"rubygem-rails-html-sanitizer&distro=SUSE OpenStack Cloud 7","name":"rubygem-rails-html-sanitizer","label":"rubygem-rails-html-sanitizer&distro=SUSE OpenStack Cloud 7","ecosystem":"SUSE Linux Enterprise","cpePart":null,"purl":"pkg:rpm/suse/rubygem-rails-html-sanitizer&distro=SUSE OpenStack Cloud 7","purlType":"rpm","versions":[{"text":"< 1.0.3-8.8.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.0.3-8.8.1","eol":null,"hubHref":null},{"vendor":"suse","product":"rubygem-rails-html-sanitizer&distro=SUSE OpenStack Cloud Crowbar 8","name":"rubygem-rails-html-sanitizer","label":"rubygem-rails-html-sanitizer&distro=SUSE OpenStack Cloud Crowbar 8","ecosystem":"SUSE Linux Enterprise","cpePart":null,"purl":"pkg:rpm/suse/rubygem-rails-html-sanitizer&distro=SUSE OpenStack Cloud Crowbar 8","purlType":"rpm","versions":[{"text":"< 1.0.3-8.8.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.0.3-8.8.1","eol":null,"hubHref":null},{"vendor":"suse","product":"rubygem-rails-html-sanitizer&distro=SUSE OpenStack Cloud Crowbar 9","name":"rubygem-rails-html-sanitizer","label":"rubygem-rails-html-sanitizer&distro=SUSE OpenStack Cloud Crowbar 9","ecosystem":"SUSE Linux Enterprise","cpePart":null,"purl":"pkg:rpm/suse/rubygem-rails-html-sanitizer&distro=SUSE OpenStack Cloud Crowbar 9","purlType":"rpm","versions":[{"text":"< 1.0.3-8.8.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.0.3-8.8.1","eol":null,"hubHref":null},{"vendor":"rubyonrails","product":"html_sanitizer","name":"html sanitizer","label":"html_sanitizer","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≤ 1.0.3","noFixRecorded":false,"fixedIn":null}],"versionsText":"≤ 1.0.3","eol":null,"hubHref":"/vendor/rubyonrails/html_sanitizer"}],"affectedCount":9,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/rails/rails-html-sanitizer/commit/f3ba1a839a35f2ba7f941c15e239a1cb379d56ae","label":"github.com/rails/rails-html-sanitizer/commit/f3ba1a839a35f2ba7f941c15e239a1cb379d56ae","hostname":"github.com","tags":["X Refsource CONFIRM","Issue Tracking","Patch","Third Party Advisory","WEB"]},{"url":"https://www.suse.com/support/update/announcement/2019/suse-su-20192182-1/","label":"www.suse.com/support/update/announcement/2019/suse-su-20192182-1/","hostname":"www.suse.com","tags":["Advisory"]},{"url":"https://bugzilla.suse.com/1086598","label":"bugzilla.suse.com/1086598","hostname":"bugzilla.suse.com","tags":["REPORT"]},{"url":"https://www.suse.com/security/cve/CVE-2018-3741","label":"www.suse.com/security/cve/CVE-2018-3741","hostname":"www.suse.com","tags":["WEB"]},{"url":"https://ubuntu.com/security/CVE-2018-3741","label":"ubuntu.com/security/CVE-2018-3741","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"http://www.openwall.com/lists/oss-security/2018/03/22","label":"www.openwall.com/lists/oss-security/2018/03/22","hostname":"www.openwall.com","tags":["REPORT"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2018-3741","label":"www.cve.org/CVERecord?id=CVE-2018-3741","hostname":"www.cve.org","tags":["REPORT"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2018-3741","label":"security-tracker.debian.org/tracker/CVE-2018-3741","hostname":"security-tracker.debian.org","tags":["Advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2018-3741","label":"nvd.nist.gov/vuln/detail/CVE-2018-3741","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/rails/rails-html-sanitizer","label":"github.com/rails/rails-html-sanitizer","hostname":"github.com","tags":["PACKAGE"]}],"lineage":{"upstream":[],"downstream":["OPENSUSE-SU-2024:12145-1","OPENSUSE-SU-2024:13137-1","OPENSUSE-SU-2024:14175-1","OPENSUSE-SU-2025:15125-1","OPENSUSE-SU-2026:10361-1","RHSA-2019:0212"],"duplicates":[],"related":["OPENSUSE-SU-2024:12145-1","OPENSUSE-SU-2024:13137-1","OPENSUSE-SU-2024:14175-1","OPENSUSE-SU-2025:15125-1","OPENSUSE-SU-2026:10361-1"]},"timeline":[{"kind":"published","date":"2018-03-30T19:00:00.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2024-08-05T04:50:30.644Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":25,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-19T21:20:36.389Z","stale":false,"partial":false}}