Cross-site Scripting (XSS) Affecting ruby-sanitize package, versions <4.6.6-2.1~0.20.04.2


Severity

Recommended
0.0
medium
0
10

Based on Ubuntu security rating.

Threat Intelligence

EPSS
0.09% (40th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Cross-site Scripting (XSS) vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-UBUNTU2004-RUBYSANITIZE-5759480
  • published24 Apr 2024
  • disclosed6 Jul 2023

Introduced: 6 Jul 2023

CVE-2023-36823  (opens in a new tab)
CWE-79  (opens in a new tab)

How to fix?

Upgrade Ubuntu:20.04 ruby-sanitize to version 4.6.6-2.1~0.20.04.2 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream ruby-sanitize package and not the ruby-sanitize package as distributed by Ubuntu. See How to fix? for Ubuntu:20.04 relevant fixed versions and status.

Sanitize is an allowlist-based HTML and CSS sanitizer. Using carefully crafted input, an attacker may be able to sneak arbitrary HTML and CSS through Sanitize starting with version 3.0.0 and prior to version 6.0.2 when Sanitize is configured to use the built-in "relaxed" config or when using a custom config that allows style elements and one or more CSS at-rules. This could result in cross-site scripting or other undesired behavior when the malicious HTML and CSS are rendered in a browser. Sanitize 6.0.2 performs additional escaping of CSS in style element content, which fixes this issue. Users who are unable to upgrade can prevent this issue by using a Sanitize config that doesn't allow style elements, using a Sanitize config that doesn't allow CSS at-rules, or by manually escaping the character sequence &lt;/ as &lt;\/ in style element content.

CVSS Base Scores

version 3.1