CVE-2023-36823

Sanitize vulnerable to Cross-site Scripting via insufficient neutralization of `style` element content

Description

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.

Category

7.1
CVSS
Severity: High
CVSS 3.1 •
EPSS 0.21%
Vendor Advisory github.com
Affected: rgrove sanitize
Published at:
Updated at:

References

Frequently Asked Questions

What is the severity of CVE-2023-36823?
CVE-2023-36823 has been scored as a high severity vulnerability.
How to fix CVE-2023-36823?
To fix CVE-2023-36823, make sure you are using an up-to-date version of the affected component(s) by checking the vendor release notes. As for now, there are no other specific guidelines available.
Is CVE-2023-36823 being actively exploited in the wild?
As for now, there are no information to confirm that CVE-2023-36823 is being actively exploited. According to its EPSS score, there is a ~0% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2023-36823?
CVE-2023-36823 affects rgrove sanitize.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.