
CVE catalog
CVE-2023-36823
ruby-sanitize: CVE-2023-36823
- 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.
| Distribution | Package | Release | Version | Status |
|---|---|---|---|---|
| Debian | ruby-sanitize | sid | 7.0.0-1 | fixed |
| Debian | ruby-sanitize | forky | 7.0.0-1 | fixed |
| Debian | ruby-sanitize | trixie | 7.0.0-1 | fixed |
| Debian | ruby-sanitize | bookworm | 6.0.0-1.1+deb12u1 | fixed |
| Debian | ruby-sanitize | bookworm-security | 6.0.0-1.1+deb12u1 | fixed |
| Ubuntu | ruby-sanitize | 20.04 | 4.6.6-2 | vulnerable |
| Ubuntu | ruby-sanitize | 20.04 | 4.6.6-2.1~0.20.04.1 | vulnerable |
| Ubuntu | ruby-sanitize | 20.04 | 4.6.6-2.1~0.20.04.2 | fixed |
| Ubuntu | ruby-sanitize | 22.04 | 5.2.1-2 | vulnerable |
| Ubuntu | ruby-sanitize | 22.04 | 5.2.3-1 | vulnerable |
| Ubuntu | ruby-sanitize | 22.04 | 6.0.0-1 | vulnerable |
| Ubuntu | ruby-sanitize | 22.04 | 6.0.0-1ubuntu0.1 | fixed |
Fixed-version evidence
| Distribution | Package | Type | Release | Fixed version | Urgency | Origin | Bugs |
|---|---|---|---|---|---|---|---|
| Debian | ruby-sanitize | source | sid | 6.0.2-1 | not yet assigned | Not reported | [1041430] |
| Debian | ruby-sanitize | source | forky | 6.0.2-1 | not yet assigned | Not reported | [1041430] |
| Debian | ruby-sanitize | source | trixie | 6.0.2-1 | not yet assigned | Not reported | [1041430] |
| Debian | ruby-sanitize | source | bookworm | 6.0.0-1.1+deb12u1 | not yet assigned | Not reported | [1041430] |
| Ubuntu | ruby-sanitize | deb | 20.04 | 4.6.6-2.1~0.20.04.2 | Not reported | UBUNTU-CVE-2023-36823 | Not reported |
| Ubuntu | ruby-sanitize | deb | 22.04 | 6.0.0-1ubuntu0.1 | Not reported | UBUNTU-CVE-2023-36823 | Not reported |
OpenFactory catalog packages
Matching against OpenFactory catalog package versions is in progress.
References
- [https://osv.dev/vulnerability/DEBIAN-CVE-2023-36823]
- [https://osv.dev/vulnerability/DLA-3652-1]
- [https://osv.dev/vulnerability/DSA-5616-1]
- [https://osv.dev/vulnerability/UBUNTU-CVE-2023-36823]
- [https://security-tracker.debian.org/tracker/CVE-2023-36823]
[Debian Security Tracker] · [FIRST EPSS] · [OSV Package Vulnerability Database]