CVE catalog

CVE-2023-36823

ruby-sanitize: CVE-2023-36823

[CVE catalog]

Severity
Medium
Published
Source
[NVD] · [CVE record]
EPSS
0.71% · Oct 25, 2026

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.

Vulnerable and fixed packages

Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.

DistributionPackageReleaseVersionStatus
Debianruby-sanitizesid7.0.0-1fixed
Debianruby-sanitizeforky7.0.0-1fixed
Debianruby-sanitizetrixie7.0.0-1fixed
Debianruby-sanitizebookworm6.0.0-1.1+deb12u1fixed
Debianruby-sanitizebookworm-security6.0.0-1.1+deb12u1fixed
Ubunturuby-sanitize20.044.6.6-2vulnerable
Ubunturuby-sanitize20.044.6.6-2.1~0.20.04.1vulnerable
Ubunturuby-sanitize20.044.6.6-2.1~0.20.04.2fixed
Ubunturuby-sanitize22.045.2.1-2vulnerable
Ubunturuby-sanitize22.045.2.3-1vulnerable
Ubunturuby-sanitize22.046.0.0-1vulnerable
Ubunturuby-sanitize22.046.0.0-1ubuntu0.1fixed

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
Debianruby-sanitizesourcesid6.0.2-1not yet assignedNot reported[1041430]
Debianruby-sanitizesourceforky6.0.2-1not yet assignedNot reported[1041430]
Debianruby-sanitizesourcetrixie6.0.2-1not yet assignedNot reported[1041430]
Debianruby-sanitizesourcebookworm6.0.0-1.1+deb12u1not yet assignedNot reported[1041430]
Ubunturuby-sanitizedeb20.044.6.6-2.1~0.20.04.2Not reportedUBUNTU-CVE-2023-36823Not reported
Ubunturuby-sanitizedeb22.046.0.0-1ubuntu0.1Not reportedUBUNTU-CVE-2023-36823Not reported

[Debian bug #1041430]

OpenFactory catalog packages

Matching against OpenFactory catalog package versions is in progress.

References