# CVE-2023-23627: ruby-sanitize: Sanitize is an allowlist-based HTML and CSS sanitizer

CVE-2023-23627 is fixed in ruby-sanitize on 1 platform, first by DEBIAN-CVE-2023-23627, released January 28, 2023. It is not reported as exploited. Patch Radar priority: Routine.

- Web page: https://patchblox.com/security/cve/CVE-2023-23627
- Priority: Routine
- CVSS: 6.1 (Medium)
- EPSS: 0.0054
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: Jan 27, 2023

## Description

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.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | ruby-sanitize Debian 12.15 (bookworm) | 6.0.0-1.1 | [DEBIAN-CVE-2023-23627](https://patchblox.com/security/data/fix/linux/debian-cve-2023-23627.md) | Jan 28, 2023 |
| Linux | ruby-sanitize Debian 13.5 (trixie) | 6.0.0-1.1 | [DEBIAN-CVE-2023-23627](https://patchblox.com/security/data/fix/linux/debian-cve-2023-23627.md) | Jan 28, 2023 |
| Linux | ruby-sanitize Debian 14 | 6.0.0-1.1 | [DEBIAN-CVE-2023-23627](https://patchblox.com/security/data/fix/linux/debian-cve-2023-23627.md) | Jan 28, 2023 |
| Linux | ruby-sanitize Ubuntu 20.04 LTS (focal) | 4.6.6-2.1~0.20.04.2 | [ruby-sanitize 4.6.6-2.1~0.20.04.2](https://patchblox.com/security/data/fix/linux/ubuntu-focal-ruby-sanitize-4.6.6-2.1-0.20.04.2.md) | Jul 6, 2023 |
| Linux | ruby-sanitize Ubuntu 22.04.1 LTS (jammy) | 6.0.0-1ubuntu0.1 | [ruby-sanitize 6.0.0-1ubuntu0.1](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-ruby-sanitize-6.0.0-1ubuntu0.1.md) | Jul 6, 2023 |

---

Data as of 2026-11-08T13:06:02Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
