Read the docs
TI-2018-02737 Aliases CVE-2018-3740GHSA-7f42-p84j-f58p

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

VendorProductAffected versionsFixed inStatusSource
Ryan Grovesanitize (ruby gem)before 4.6.34.6.3Patch availableCNA
—sanitize (RubyGems)3.0.0 to before 4.6.34.6.3Patch availableGHSA-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

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:sanitize_project:sanitize:*:*:*:*:*:ruby:*:*up to 4.6.0Vulnerablergrove
  • cpe:2.3:a:sanitize_project:sanitize:*:*:*:*:*:ruby:*:* Versions up to 4.6.0 Vulnerable ·rgrove

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

Red Hat

Red Hat's page for this CVE →

Not affected: 1 product
  • Red Hat

Timeline

  1. 2026-10-02 Threatist record created from CVE-2018-3740
  2. 2026-10-03 Alias added: GHSA-7f42-p84j-f58p

References

  • 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