GitHub Advisoryadvisory · RubyGems

GHSA-7f42-p84j-f58p Sanitize vulnerable to Improper Input Validation and Cross-site Scripting

HIGH Published 2018-03-21 Modified 2023-01-23 Official page ↗
Aliases
CVE-2018-3740
Ecosystem
RubyGems
Packages
sanitize
Severity
High
CVSS vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Weaknesses
CWE-20, CWE-79
Reviewed
2020-06-16

Affected packages

• RubyGems sanitize: >= 3.0.0, < 4.6.3 → fixed in 4.6.3

Description

When Sanitize = 2.9.2, a specially crafted HTML fragment can cause libxml2 to generate improperly escaped output, allowing non-whitelisted attributes to be used on whitelisted elements. This can allow HTML and JavaScript injection, which could result in XSS if Sanitize's output is served to browsers.

Related

Alias · CVE (1)

  • CVE-2018-3740 A specially crafted HTML fragment can cause Sanitize gem for Ruby to allow non-whitelisted attributes to be used on a whitelisted HTML… vulnerability

Weakness · CWE (2)

  • CWE-20 Improper Input Validation weakness
  • CWE-79 Improper Neutralization of Input During Web Page Generation weakness

References