CVE-2023-23627
MEDIUM 6.1CVSS 3.1Improper neutralization of `noscript` element content may allow XSS in Sanitize
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.
- Published
- 28 Jan 2023
- Last modified
- 17 Jun 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-79
- Also known as
- GHSA-fw3g-2h3j-qmm7
- Sources
- NVDJSONOSV GHSA-fw3g-2h3j-qmm7JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | sanitize_project | sanitizecpe:2.3:a:sanitize_project:sanitize:*:*:*:*:*:ruby:*:* |
>= 5.0.0, < 6.0.1 | 6.0.1 |
| OSV | RubyGems | sanitize | >= 5.0.0, < 6.0.1 | 6.0.1 |
References
- https://github.com/rgrove/sanitize/security/advisories/GHSA-fw3g-2h3j-qmm7 · Mitigation, Release Notes, Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2023-23627 · ADVISORY
- https://github.com/rgrove/sanitize/commit/ec14265e530dc3fe31ce2ef773594d3a97778d22 · WEB
- https://github.com/rgrove/sanitize · PACKAGE
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/sanitize/CVE-2023-23627.yml · WEB
History
- 25 Nov 2026 20:35 UTC · NVD: first stored (published 28 Jan 2023)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 28 Jan 2023)