CVE-2018-3740
HIGH 7.5CVSS 3.0Sanitize vulnerable to Improper Input Validation and Cross-site Scripting
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
- 30 Mar 2018
- Last modified
- 17 Jun 2026
- Assigned by
- support@hackerone.com
- NVD status
- Modified
- Weakness
- CWE-20CWE-79
- Also known as
- GHSA-7f42-p84j-f58p
- Sources
- NVDJSONOSV GHSA-7f42-p84j-f58pJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.0 | HIGH 7.5 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| OSV | GitHub | CVSS 3.0 | HIGH 7.5 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 5.0 | AV:N/AC:L/Au:N/C:N/I:P/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | sanitize_project | sanitizecpe:2.3:a:sanitize_project:sanitize:*:*:*:*:*:ruby:*:* |
<= 4.6.0 | |
| OSV | RubyGems | sanitize | >= 3.0.0, < 4.6.3 | 4.6.3 |
References
- https://about.gitlab.com/2018/06/25/security-release-gitlab-11-dot-0-dot-1-released/ · WEB
- https://github.com/rgrove/sanitize/commit/01629a162e448a83d901456d0ba8b65f3b03d46e · Patch, Third Party Advisory, WEB
- https://github.com/rgrove/sanitize/issues/176 · Issue Tracking, Third Party Advisory, WEB
- https://www.debian.org/security/2018/dsa-4358 · WEB
- https://nvd.nist.gov/vuln/detail/CVE-2018-3740 · ADVISORY
- https://github.com/rgrove/sanitize/commit/93feeb38e21864146bb29191792b971dbe1ec62e · WEB
- https://github.com/rgrove/sanitize · PACKAGE
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/sanitize/CVE-2018-3740.yml · WEB
History
- 25 Nov 2026 20:20 UTC · NVD: first stored (published 30 Mar 2018)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 21 Mar 2018)