Cross-site scripting in Ryan Grove sanitize
Priority LOW 36CWE-79Published · Updated
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- None · High · None
- Fix status
- Fixed
Attack profile from CVSS 3.0 · NVD. Fix status from CNA and GitHub. Impact type from CWE-79.
Summary
A specially crafted HTML fragment can cause Sanitize gem for Ruby to allow non-whitelisted attributes to be used on a whitelisted HTML element.
Why it matters now
EPSS 0.01468 73rd percentileScored 2026-11-07
Fix Fixed sanitize (ruby gem) (Ryan Grove): 4.6.3sanitize (RubyGems): 4.6.3
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Ryan Grove | sanitize (ruby gem) | before 4.6.3 | 4.6.3 | Patch available | CNA |
| — | sanitize (RubyGems) | 3.0.0 to before 4.6.3 | 4.6.3 | Patch available | GHSA-7f42-p84j-f58p |
- sanitize (ruby gem) VendorRyan Grove Affected before 4.6.3 Fixed in 4.6.3 Patch available CNA
- sanitize (RubyGems) Vendor— Affected 3.0.0 to before 4.6.3 Fixed in 4.6.3 Patch available GHSA-7f42-p84j-f58p
Remediation
- Fix · CNA sanitize (ruby gem) (Ryan Grove) Fixed in 4.6.3
- Fix · GHSA-7f42-p84j-f58p sanitize (RubyGems) Fixed in 4.6.3 Advisory →
Vendor assessments
Timeline
- 2026-10-02 Threatist record created from CVE-2018-3740
- 2026-10-03 Alias added: GHSA-7f42-p84j-f58p
References
Advisory 3
Other 5
- https://about.gitlab.com/2018/06/25/security-release-gitlab-11-dot-0-dot-1-released/
- https://github.com/rgrove/sanitize/commit/93feeb38e21864146bb29191792b971dbe1ec62e
- https://about.gitlab.com/2018/06/25/security-release-gitlab-11-dot-0-dot-1-released
- https://github.com/rgrove/sanitize
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/sanitize/CVE-2018-3740.yml
More rgrove Sanitize vulnerabilities
- TI-2020-03543 Cross-site Scripting in Sanitize CVSS 3.1HIGH 7.3
- TI-2023-18617 Sanitize vulnerable to Cross-site Scripting via insufficient neutralization of `style` element content CVSS 3.1HIGH 7.1
- TI-2023-09456 Sanitize vulnerable to Cross-site Scripting via Improper neutralization of `noscript` element CVSS 3.1MEDIUM 6.1
Sources
- CVE-2018-3740 · CVE Program
- CVE-2018-3740 · NVD
- FIRST EPSS
- GHSA-7f42-p84j-f58p · GitHub Advisory Database · CC BY 4.0
- CVE-2018-3740 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences