CVE-2023-23627: Sanitize vulnerable to Cross-site Scripting via Improper neutralization of `noscript` element
Vulnerability summary
CVE-2023-23627 is a medium (CVSS 6.1) vulnerability in rgrove sanitize. EPSS estimates a 0.56% chance of exploitation in the next 30 days, higher than 48% of scored vulnerabilities.
Not severe (CVSS 6.1, network access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 1 · Related 1Timeline
- 27-01-2023PublishedVulnerability first disclosed.
- 10-03-2025Last modifiedVulnerability information updated.
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.
CVSS metrics
5 scores · 5 sources · 1 version- OSV · UbuntuEcosystem advisory · calculated6.1MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- OSV · DebianEcosystem advisory · calculated6.1MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- OSV · RubygemsEcosystem advisory · calculated6.1MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- NVDNIST6.1MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
EPSS trend
Probability
0.56%
Chance of exploitation in the next 30 days
Percentile
48%
Versus all other CVEs
30-day change
Increase +0.03 pp
From 0.53% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, user interaction (CVSS vector). Other conditions: not stated in public data.
Debian1 product
- ruby-sanitize< 6.0.0-1.1
Rgrove1 product
- sanitize≥ 5.0.0, < 6.0.1
RubyGems1 product
- sanitize≥ 5.0.0, < 6.0.1
Sanitize_project1 product
- sanitize≥ 5.0.0, < 6.0.1
Ubuntu1 product
- ruby-sanitize< 4.6.6-2.1~0.20.04.2 | < 6.0.0-1ubuntu0.1
5 vendors · 5 products
References
9 links- github.com/rgrove/sanitize/security/advisories/GHSA-fw3g-2h3j-qmm7X Refsource CONFIRMREPORTWEBMitigationRelease NotesThird Party Advisory
- github.com/rgrove/sanitizePACKAGE