{"id":"GHSA-7f42-p84j-f58p","summary":"Sanitize vulnerable to Improper Input Validation and Cross-site Scripting","details":"When Sanitize \u003c= 4.6.2 is used in combination with libxml2 \u003e= 2.9.2, a specially crafted HTML fragment can cause libxml2 to generate improperly escaped output, allowing non-whitelisted attributes to be used on whitelisted elements.\n\nThis can allow HTML and JavaScript injection, which could result in XSS if Sanitize's output is served to browsers.","aliases":["CVE-2018-3740"],"modified":"2024-02-16T08:20:34.576085Z","published":"2018-03-21T11:56:32Z","database_specific":{"cwe_ids":["CWE-20","CWE-79"],"severity":"HIGH","github_reviewed":true,"github_reviewed_at":"2020-06-16T21:22:33Z","nvd_published_at":"2018-03-30T19:29:00Z"},"references":[{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2018-3740"},{"type":"WEB","url":"https://github.com/rgrove/sanitize/issues/176"},{"type":"WEB","url":"https://github.com/rgrove/sanitize/commit/01629a162e448a83d901456d0ba8b65f3b03d46e"},{"type":"WEB","url":"https://github.com/rgrove/sanitize/commit/93feeb38e21864146bb29191792b971dbe1ec62e"},{"type":"WEB","url":"https://about.gitlab.com/2018/06/25/security-release-gitlab-11-dot-0-dot-1-released"},{"type":"PACKAGE","url":"https://github.com/rgrove/sanitize"},{"type":"WEB","url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/sanitize/CVE-2018-3740.yml"},{"type":"WEB","url":"https://www.debian.org/security/2018/dsa-4358"}],"affected":[{"package":{"name":"sanitize","ecosystem":"RubyGems","purl":"pkg:gem/sanitize"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.0.0"},{"fixed":"4.6.3"}]}],"versions":["3.0.0","3.0.1","3.0.2","3.0.3","3.0.4","3.1.0","3.1.1","3.1.2","4.0.0","4.0.1","4.1.0","4.2.0","4.3.0","4.4.0","4.5.0","4.6.0","4.6.1","4.6.2"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2018/03/GHSA-7f42-p84j-f58p/GHSA-7f42-p84j-f58p.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"}]}