
CVE catalog
CVE-2023-23627
ruby-sanitize: CVE-2023-23627
- Severity
- Medium
- Published
- Source
- [NVD] · [CVE record]
- EPSS
- 0.53% · Oct 27, 2026
Sanitize is an allowlist-based HTML and CSS sanitizer. Versions 5.0.0 and later, prior to 6.0.1, are vulnerable to Cross-site Scripting. When Sanitize is configured with a custom allowlist that allows `noscript` elements, attackers are able to include arbitrary HTML, resulting in XSS (cross-site scripting) or other undesired behavior when that HTML is rendered in a browser. The default configurations do not allow `noscript` elements and are not vulnerable. This issue only affects users who are using a custom config that adds `noscript` to the element allowlist. This issue has been patched in version 6.0.1. Users who are unable to upgrade can prevent this issue by using one of Sanitize's default configs or by ensuring that their custom config does not include `noscript` in the element allowlist.
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 |
| 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.0-1.1 | not yet assigned | Not reported | [1030047] |
| Debian | ruby-sanitize | source | forky | 6.0.0-1.1 | not yet assigned | Not reported | [1030047] |
| Debian | ruby-sanitize | source | trixie | 6.0.0-1.1 | not yet assigned | Not reported | [1030047] |
| Debian | ruby-sanitize | source | bookworm | 6.0.0-1.1 | not yet assigned | Not reported | [1030047] |
| Ubuntu | ruby-sanitize | deb | 20.04 | 4.6.6-2.1~0.20.04.2 | Not reported | USN-6748-1 | Not reported |
| Ubuntu | ruby-sanitize | deb | 22.04 | 6.0.0-1ubuntu0.1 | Not reported | USN-6748-1 | Not reported |
| Ubuntu | ruby-sanitize | deb | 20.04 | 4.6.6-2.1~0.20.04.2 | Not reported | UBUNTU-CVE-2023-23627 | Not reported |
| Ubuntu | ruby-sanitize | deb | 22.04 | 6.0.0-1ubuntu0.1 | Not reported | UBUNTU-CVE-2023-23627 | Not reported |
OpenFactory catalog packages
[Debian 12 (Bookworm)]
- [ruby-sanitize]Fixed
Details (4)
6.0.0-1.1+deb12u1· all · bookwormFixed · Fixed:
6.0.0-1.1dsa · ruby-sanitize · debian · bookworm; dsa · ruby-sanitize · debian · 12
6.0.0-1.1+deb12u1· all · bookwormFixed · Fixed:
6.0.0-1.1dsa · ruby-sanitize · debian · bookworm; dsa · ruby-sanitize · debian · 12
6.0.0-1.1+deb12u1· all · bookworm-securityFixed · Fixed:
6.0.0-1.1dsa · ruby-sanitize · debian · bookworm; dsa · ruby-sanitize · debian · 12
6.0.0-1.1+deb12u1· all · bookworm-securityFixed · Fixed:
6.0.0-1.1dsa · ruby-sanitize · debian · bookworm; dsa · ruby-sanitize · debian · 12
[Debian 13 (Trixie)]
- [ruby-sanitize]Fixed
Details (2)
7.0.0-1· all · trixieFixed · Fixed:
6.0.0-1.1dsa · ruby-sanitize · debian · 13
7.0.0-1· all · trixieFixed · Fixed:
6.0.0-1.1dsa · ruby-sanitize · debian · 13
Observed: