CVE Catalog

CVE-2023-36823

HighCVSS 7.1
Published: Updated: Translated: NVD NIST

Exploitation Probability (EPSS)

Low risk
0.60%

44th percentile - higher than 44% of all known CVEs

Summary

Sanitize is an HTML and CSS sanitizer that in versions from 3.0.0 to 6.0.2 may be vulnerable to injection of malicious HTML and CSS. An attacker can exploit carefully crafted input to introduce unauthorized code, potentially leading to cross-site scripting attacks.

Risk Assessment

Organizations may be exposed to XSS attacks and other undesired behaviors in browsers, which could lead to data theft or session compromise.

Recommendation

It is recommended to upgrade to version 6.0.2 or to use a Sanitize configuration that does not allow `style` elements and CSS at-rules. Alternatively, the character sequence `</` in `style` element content can be manually escaped.

Related vulnerabilities

Original NVD description (English source)

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 `</` as `<\/` in `style` element content.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS