# CVE-2018-3740: Sanitize vulnerable to Improper Input Validation and Cross-site Scripting

Source: https://junglewise.ai/threats/cve-2018-3740-sanitize-vulnerable-to-improper-input-validation-and-cross-site  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2018-03-21  
License: CC BY 4.0 with a link back

CVE-2018-3740 · Severity: low · CVSS 3 · Published 2018-03-21

Sanitize vulnerable to Improper Input Validation and Cross-site Scripting

Technologies: [sanitize (RubyGems)](https://junglewise.ai/threats/technologies/sanitize). Vendors: [RubyGems](https://junglewise.ai/threats/vendors/rubygems).

## Quick answers

**Is CVE-2018-3740 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2018-3740 being exploited in the wild.

**How severe is CVE-2018-3740?** Low severity, with a CVSS score of 3, published 21 March 2018.

**Which products and versions are affected?** sanitize (RubyGems) ECOSYSTEM:introduced=3.0.0,fixed=4.6.3.

**Is there a fix for CVE-2018-3740?** Yes. sanitize (RubyGems): upgrade to 4.6.3 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2018-3740?** Check whether you run sanitize (RubyGems) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- sanitize (RubyGems): upgrade to 4.6.3 or later

  ```sh
  bundle update sanitize
  ```


## Affected products

- sanitize (RubyGems) ECOSYSTEM:introduced=3.0.0,fixed=4.6.3

## Identifiers

- CVE-2018-3740
- GHSA-7f42-p84j-f58p

## Related threats

- [Sanitize vulnerable to Cross-site Scripting via insufficient neutralization of `style` element content](https://junglewise.ai/threats/cve-2023-36823-sanitize-vulnerable-to-cross-site-scripting-via-insufficient)
- [Improper neutralization of `noscript` element content may allow XSS in Sanitize](https://junglewise.ai/threats/cve-2023-23627-improper-neutralization-of-noscript-element-content-may-allow-xss)
- [Cross-site Scripting in Sanitize](https://junglewise.ai/threats/cve-2020-4054-cross-site-scripting-in-sanitize)
