# CVE-2018-3740

- Priority: **Prioritise**
- Reason: Severe, CVSS 7.5 (NVD); no exploitation reported by the 5 checked sources; EPSS 1% (FIRST, 04-12-2026)
- Next step: Check applicability and the vendor advisory: no fix release is recorded here
- Status: published
- Published: 2018-03-30 · Modified: 2024-08-05
- Aliases: UBUNTU-CVE-2018-3740, DEBIAN-CVE-2018-3740, DSA-4358-1, GHSA-7f42-p84j-f58p
- Record: https://cvemate.com/vulnerability/CVE-2018-3740 · JSON: https://cvemate.com/vulnerability/CVE-2018-3740/json

## Description

```text
A specially crafted HTML fragment can cause Sanitize gem for Ruby to allow non-whitelisted attributes to be used on a whitelisted HTML element.
```

## Signals

- CVSS: 7.5 high (v3.0, NVD) CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
- EPSS: 1.468%, percentile 74.622%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- debian ruby-sanitize (Debian): \< 4.6.6-1 \| \< 2.1.0-2+deb9u1
- ubuntu ruby-sanitize (Ubuntu): \< 2.1.0-2+deb9u1build0.16.04.1 \| \< 2.1.0-2+deb9u1build0.18.04.1
- RubyGems sanitize (RubyGems): ≥ 3.0.0, \< 4.6.3
- ryan grove sanitize (ruby gem): \< 4.6.3
- sanitize\_project sanitize: ≤ 4.6.0

## References

- <https://www.debian.org/security/2018/dsa-4358>
- <https://github.com/rgrove/sanitize/issues/176>
- <https://about.gitlab.com/2018/06/25/security-release-gitlab-11-dot-0-dot-1-released/>
- <https://github.com/rgrove/sanitize/commit/01629a162e448a83d901456d0ba8b65f3b03d46e>
- <https://ubuntu.com/security/CVE-2018-3740>
- <https://www.cve.org/CVERecord?id=CVE-2018-3740>
- <https://security-tracker.debian.org/tracker/CVE-2018-3740>
- <https://nvd.nist.gov/vuln/detail/CVE-2018-3740>
- <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>

---

Data as of 2026-12-05T07:47:35.032Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
