CVE-2023-23627 Sanitize vulnerable to Cross-site Scripting via Improper neutralization of `noscript` element
- Published
- Updated
- Exploit status
- Proof-of-concept only
- CISA SSVC
- No known exploitation · automatable: no · technical impact: partial
- Technology
- UbuntuDebian
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.
Upgrade path
8 packages: 7 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| debian/ruby-sanitize(Debian 12) | < 6.0.0-1.1 | 6.0.0-1.1 | Fixed |
| debian/ruby-sanitize(Debian 13) | < 6.0.0-1.1 | 6.0.0-1.1 | Fixed |
| debian/ruby-sanitize(Debian 14) | < 6.0.0-1.1 | 6.0.0-1.1 | Fixed |
| rubygems sanitize(RubyGems) | = 5.0.0; = 5.1.0; = 5.2.0; = 5.2.1 +4 more | 6.0.1 | Fixed |
| sanitize project sanitize | >= 5.0.0, < 6.0.1 | 6.0.1 | Fixed |
| ubuntu/ruby-sanitize(Ubuntu 20.04) | < 4.6.6-2.1~0.20.04.2; = 4.6.6-2; = 4.6.6-2.1~0.20.04.1 | 4.6.6-2.1~0.20.04.2 | Fixed |
| ubuntu/ruby-sanitize(Ubuntu 22.04) | < 6.0.0-1ubuntu0.1; = 5.2.1-2; = 5.2.3-1; = 6.0.0-1 | 6.0.0-1ubuntu0.1 | Fixed |
| rgrove sanitize | = >= 5.0.0, < 6.0.1 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| rubygems sanitize(RubyGems) | >= 5.0.0, < 6.0.1 | 6.0.1 |
| rubygems sanitize(RubyGems) | = 5.0.0 | No fix listed |
| rubygems sanitize(RubyGems) | = 5.1.0 | No fix listed |
| rubygems sanitize(RubyGems) | = 5.2.0 | No fix listed |
| rubygems sanitize(RubyGems) | = 5.2.1 | No fix listed |
| rubygems sanitize(RubyGems) | = 5.2.2 | No fix listed |
| rubygems sanitize(RubyGems) | = 5.2.3 | No fix listed |
| rubygems sanitize(RubyGems) | = 6.0.0 | No fix listed |
| debian/ruby-sanitize(Debian:12) | < 6.0.0-1.1 | 6.0.0-1.1 |
| debian/ruby-sanitize(Debian:13) | < 6.0.0-1.1 | 6.0.0-1.1 |
| debian/ruby-sanitize(Debian:14) | < 6.0.0-1.1 | 6.0.0-1.1 |
| rgrove sanitize | = >= 5.0.0, < 6.0.1 | No fix listed |
| ubuntu/ruby-sanitize(Ubuntu:22.04) | < 6.0.0-1ubuntu0.1 | 6.0.0-1ubuntu0.1 |
| sanitize project sanitize | >= 5.0.0, < 6.0.1 | 6.0.1 |
| ubuntu/ruby-sanitize(Ubuntu:20.04) | < 4.6.6-2.1~0.20.04.2 | 4.6.6-2.1~0.20.04.2 |
| ubuntu/ruby-sanitize(Ubuntu:20.04) | = 4.6.6-2 | No fix listed |
| ubuntu/ruby-sanitize(Ubuntu:20.04) | = 4.6.6-2.1~0.20.04.1 | No fix listed |
| ubuntu/ruby-sanitize(Ubuntu:22.04) | = 5.2.1-2 | No fix listed |
| ubuntu/ruby-sanitize(Ubuntu:22.04) | = 5.2.3-1 | No fix listed |
| ubuntu/ruby-sanitize(Ubuntu:22.04) | = 6.0.0-1 | No fix listed |
References
- https://github.com/rgrove/sanitize/security/advisories/GHSA-fw3g-2h3j-qmm7 issue-tracking mitigation release-notes third-party-advisory vendor-advisory
- nvd.nist.gov third-party-advisory vendor-advisory
- github.com issue-tracking patch
- github.com exploit
- github.com
- github.com product
- Debian Security Tracker CVE-2023-23627 vendor-advisory
- Ubuntu CVE tracker issue-tracking vendor-advisory
- USN-6748-1 vendor-advisory
- www.cve.org issue-tracking
- bugs.debian.org issue-tracking