CVE-2023-23627 json
Sanitize vulnerable to Cross-site Scripting via Improper neutralization of `noscript` element
published 2023-01-27 3 y ago modified 2026-06-17 4 mo ago also GHSA-fw3g-2h3j-qmm7 , EUVD-2023-0461
- cvss
- 6.1
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.5%
- EPSS 0.5% chance of exploitation in 30 days, percentile 45%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- rubygems sanitize 6.0.1
- sanitize_project sanitize 6.0.1
- ruby-sanitize Debian 14, Debian 13, Debian 12 6.0.0-1.1
debian advisories DEBIAN-CVE-2023-23627
- ruby-sanitize Ubuntu 20.04 LTS 4.6.6-2.1~0.20.04.2
- ruby-sanitize Ubuntu 22.04 LTS 6.0.0-1ubuntu0.1
ubuntu advisories UBUNTU-CVE-2023-23627
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 19 mo ago
Exploit prediction
0.54% chance of exploitation in the next 30 days, higher than 45% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVD | 3.1 | 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| GitHub | 3.1 | 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| rubygems | sanitize | >=5.0.0, <6.0.1 |
6.0.1 |
Affected products
- rgrove sanitize
Classification
- Weakness
-
- CWE-79 Improper Neutralization of Input During Web Page Generation
References
-
github.com
/rgrove/sanitize/commit/ec14265e530dc3fe31ce2ef773594d3a97778d22
web
-
github.com
/rgrove/sanitize/security/advisories/GHSA-fw3g-2h3j-qmm7
web, mitigation, release-notes, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2023-23627
advisory
-
github.com
/rgrove/sanitize
package
-
github.com
/rubysec/ruby-advisory-db/blob/master/gems/sanitize/CVE-2023-23627.yml
web
Sources
- CVE List CVE-2023-23627
- GitHub Advisory GHSA-fw3g-2h3j-qmm7
- NVD CVE-2023-23627
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.