turkdevops / snyk

CLI and build-time tool to find & fix known vulnerabilities in open-source dependencies
https://snyk.io
Other
1 stars 2 forks source link

CVE-2023-36823 (Medium) detected in sanitize-4.6.2.gem #294

Open mend-bolt-for-github[bot] opened 1 year ago

mend-bolt-for-github[bot] commented 1 year ago

CVE-2023-36823 - Medium Severity Vulnerability

Vulnerable Library - sanitize-4.6.2.gem

Sanitize is a whitelist-based HTML and CSS sanitizer. Given a list of acceptable elements, attributes, and CSS properties, Sanitize will remove all unacceptable HTML and/or CSS from a string.

Library home page: https://rubygems.org/gems/sanitize-4.6.2.gem

Path to dependency file: /test/acceptance/workspaces/ruby-app-policy/Gemfile.lock

Path to vulnerable library: /test/acceptance/workspaces/ruby-app-policy/Gemfile.lock,/test/acceptance/workspaces/ruby-app-thresholds/Gemfile.lock

Dependency Hierarchy: - :x: **sanitize-4.6.2.gem** (Vulnerable Library)

Found in HEAD commit: 9505f4ca92405cc9273dc3726c2d274ce28a4407

Found in base branch: ALL_HANDS/major-secrets

Vulnerability Details

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 `Publish Date: 2023-07-06

URL: CVE-2023-36823

CVSS 3 Score Details (6.1)

Base Score Metrics: - Exploitability Metrics: - Attack Vector: Network - Attack Complexity: Low - Privileges Required: None - User Interaction: Required - Scope: Changed - Impact Metrics: - Confidentiality Impact: Low - Integrity Impact: Low - Availability Impact: None

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: https://www.cve.org/CVERecord?id=CVE-2023-36823

Release Date: 2023-07-06

Fix Resolution: sanitize - 6.0.2


Step up your Open Source Security Game with Mend here