CVE-2023-23627
published medium CVSS 3.1 · 6.1Sanitize vulnerable to Cross-site Scripting via Improper neutralization of `noscript` element
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| rgrove | — | sanitize>= 5.0.0, < 6.0.1 | Affected | Not stated | GitHub_M |
| Ubuntu | focal | ruby-sanitize | Advisory build | 4.6.6-2.1~0.20.04.2 | USN-6748-1 |
| Ubuntu | jammy | ruby-sanitize | Advisory build | 6.0.0-1ubuntu0.1 | USN-6748-1 |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 6.1 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| rgrove | sanitize | >= 5.0.0, < 6.0.1 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-79 CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
References
1Provider assertions
3GitHub_M · cna
Sanitize vulnerable to Cross-site Scripting via Improper neutralization of `noscript` element
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 30785f626d718508aee52360218f0e51b1b0f337c8c178d509ffede05e4cbb4f
- Ingested
- 23 Sep 2026, 08:06:24 UTC
- Source record
- Official CVE record