Live threats

All CVEs / Sanitize Project

CVE-2018-3740Sanitize Project Sanitize

High 7.5 No auth needed

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
Weakness (CWE)
CWE-79, CWE-20
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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Sanitize.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow 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)

VendorProductVersions
sanitize_projectsanitize≤ 4.6.0

Official sources

References

Links published by the sources. Open them with care.