{"cve":"CVE-2023-36823","nvd":{"published":"2023-07-06T16:15:10.147","modified":"2026-06-17T06:07:09.173","status":"Modified","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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1},"cwes":["CWE-79"],"references":["https://github.com/rgrove/sanitize/commit/76ed46e6dc70820f38efe27de8dabd54dddb5220","https://github.com/rgrove/sanitize/releases/tag/v6.0.2","https://github.com/rgrove/sanitize/security/advisories/GHSA-f5ww-cq3m-q3g7","https://lists.debian.org/debian-lts-announce/2023/11/msg00008.html","https://github.com/rgrove/sanitize/commit/76ed46e6dc70820f38efe27de8dabd54dddb5220"],"products":["debian:debian_linux","sanitize_project:sanitize"],"source":"nvd","synced_at":"2026-10-19T21:38:30.124994567+00:00"},"epss":{"cve":"CVE-2023-36823","score":0.00712,"percentile":0.53606,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-f5ww-cq3m-q3g7","url":"https://osv.dev/vulnerability/GHSA-f5ww-cq3m-q3g7","summary":"Sanitize vulnerable to Cross-site Scripting via insufficient neutralization of `style` element content","modified":"2024-02-16T07:55:20.893240Z","packages":[{"ecosystem":"RubyGems","name":"sanitize","purl":"pkg:gem/sanitize","ranges":[">=3.0.0 <6.0.2"],"fixed":["6.0.2"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}