{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2018-3740","id":"CVE-2018-3740","title":"Sanitize vulnerable to Improper Input Validation and Cross-site Scripting","description":"A specially crafted HTML fragment can cause Sanitize gem for Ruby to allow non-whitelisted attributes to be used on a whitelisted HTML element.","descriptionLong":"A specially crafted HTML fragment can cause Sanitize gem for Ruby to allow non-whitelisted attributes to be used on a whitelisted HTML element.","published":"2018-03-30T19:00:00.000Z","updated":"2026-10-20T10:50:27.807921225Z","reserved":"2017-12-28T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"hackerone","metric":{"version":"3.0","score":7.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","rating":"high","source":"NVD"},"metrics":[{"version":"3.0","score":7.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","rating":"high","source":"NVD"},{"version":"3.0","score":7.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","rating":"high","source":"OSV"},{"version":"3.0","score":7.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","rating":"high","source":"GitHub"},{"version":"2.0","score":5,"vector":"AV:N/AC:L/Au:N/C:N/I:P/A:N","rating":"medium","source":"NVD"}],"rating":"high","products":["Ryan Grove sanitize (ruby gem)"],"affectedProducts":[{"vendor":"Ryan Grove","product":"sanitize (ruby gem)","defaultStatus":null,"versions":[{"status":"affected","version":"< 4.6.3"}],"platforms":[]}],"packages":[{"ecosystem":"RubyGems","name":"sanitize","purl":"pkg:gem/sanitize","ranges":[">=3.0.0 <4.6.3"],"fixed":["4.6.3"],"advisory":"GHSA-7f42-p84j-f58p"}],"cwes":["CWE-79","CWE-20"],"aliases":["GHSA-7f42-p84j-f58p"],"references":[{"url":"https://www.debian.org/security/2018/dsa-4358","tags":["vendor-advisory","x_refsource_DEBIAN","x_transferred","advisory","web"]},{"url":"https://github.com/rgrove/sanitize/issues/176","tags":["x_refsource_CONFIRM","x_transferred","Issue Tracking","Third Party Advisory","report","web"]},{"url":"https://about.gitlab.com/2018/06/25/security-release-gitlab-11-dot-0-dot-1-released/","tags":["x_refsource_CONFIRM","x_transferred","web"]},{"url":"https://github.com/rgrove/sanitize/commit/01629a162e448a83d901456d0ba8b65f3b03d46e","tags":["x_refsource_CONFIRM","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2018-3740","tags":["advisory"]},{"url":"https://github.com/rgrove/sanitize/commit/93feeb38e21864146bb29191792b971dbe1ec62e","tags":["web"]},{"url":"https://about.gitlab.com/2018/06/25/security-release-gitlab-11-dot-0-dot-1-released","tags":["web"]},{"url":"https://github.com/rgrove/sanitize","tags":["package"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/sanitize/CVE-2018-3740.yml","tags":["web"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.01468,"epssPercentile":0.74251,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2018-3740","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2018-3740","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2018-3740","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-7f42-p84j-f58p","ok":true,"note":"GHSA-7f42-p84j-f58p"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2018-3740","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}