CVE-2018-3740Sanitize Project Sanitize
High 7.5 No auth needed
Follow: this CVE · Sanitize Project · Sanitize Project Sanitize We alert you by email or Slack (account required).
- Priority
- 60
- CVSS 3.0
- 7.5
- EPSS
- 1.5% probability of exploitation in 30 days · percentile 74
- Auth required
- No
- Published
- Mar 30, 2018
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
What happens
A specially crafted HTML fragment can cause Sanitize gem for Ruby to allow non-whitelisted attributes to be used on a whitelisted HTML element.
What to do
- Apply the vendor's security update for Sanitize.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| RubyGems | sanitize |
≥ 3.0.0 < 4.6.3 |
4.6.3 |
gem "sanitize", ">= 4.6.3" |
Per OSV / GitHub Advisories (GHSA-7f42-p84j-f58p). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| sanitize_project | sanitize | ≤ 4.6.0 |
Official sources
References
Links published by the sources. Open them with care.
- about.gitlab.com
- github.com Patch Third Party Advisory
- github.com Issue Tracking Third Party Advisory
- www.debian.org