CVE-2023-36823

NameCVE-2023-36823
DescriptionSanitize 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.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)
ReferencesDLA-3652-1, DSA-5616-1
Debian Bugs1041430

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
ruby-sanitize (PTS)bullseye (security), bullseye5.2.1-2+deb11u1fixed
bookworm, bookworm (security)6.0.0-1.1+deb12u1fixed
sid, trixie6.0.2-2fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
ruby-sanitizesourcebuster4.6.6-2.1~deb10u2DLA-3652-1
ruby-sanitizesourcebullseye5.2.1-2+deb11u1DSA-5616-1
ruby-sanitizesourcebookworm6.0.0-1.1+deb12u1DSA-5616-1
ruby-sanitizesource(unstable)6.0.2-11041430

Notes

https://github.com/rgrove/sanitize/commit/76ed46e6dc70820f38efe27de8dabd54dddb5220 (v6.0.2)
https://github.com/rgrove/sanitize/security/advisories/GHSA-f5ww-cq3m-q3g7

Search for package or bug name: Reporting problems