CVE-2023-36823 Sanitize vulnerable to Cross-site Scripting via insufficient neutralization of `style` element content
- Published
- Updated
- Exploit status
- Proof-of-concept only
- Technology
- UbuntuDebian
Description
Sanitize is an allowlist-based HTML and CSS sanitizer. Using carefully crafted input, an attacker may be able to sneak arbitrary HTML and CSS through Sanitize starting with version 3.0.0 and prior to version 6.0.2 when Sanitize is configured to use the built-in "relaxed" config or when using a custom config that allows style elements and one or more CSS at-rules. This could result in cross-site scripting or other undesired behavior when the malicious HTML and CSS are rendered in a browser. Sanitize 6.0.2 performs additional escaping of CSS in style element content, which fixes this issue. Users who are unable to upgrade can prevent this issue by using a Sanitize config that doesn't allow style elements, using a Sanitize config that doesn't allow CSS at-rules, or by manually escaping the character sequence </ as <\/ in style element content.
Upgrade path
9 packages: 7 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| debian/ruby-sanitize(Debian 12) | < 6.0.0-1.1+deb12u1; = 6.0.0-1.1 | 6.0.0-1.1+deb12u1 | Fixed |
| debian/ruby-sanitize(Debian 13) | < 6.0.2-1 | 6.0.2-1 | Fixed |
| debian/ruby-sanitize(Debian 14) | < 6.0.2-1 | 6.0.2-1 | Fixed |
| rubygems sanitize(RubyGems) | = 3.0.0; = 3.0.1; = 3.0.2; = 3.0.3 +27 more | 6.0.2 | Fixed |
| sanitize project sanitize | >= 3.0.0, < 6.0.2 | 6.0.2 | 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 |
| debian linux | = 10.0 | No fix listed | Versions listed |
| rgrove sanitize | = >= 3.0.0, < 6.0.2 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| rubygems sanitize(RubyGems) | >= 3.0.0, < 6.0.2 | 6.0.2 |
| rubygems sanitize(RubyGems) | = 3.0.0 | No fix listed |
| rubygems sanitize(RubyGems) | = 3.0.1 | No fix listed |
| rubygems sanitize(RubyGems) | = 3.0.2 | No fix listed |
| rubygems sanitize(RubyGems) | = 3.0.3 | No fix listed |
| rubygems sanitize(RubyGems) | = 3.0.4 | No fix listed |
| rubygems sanitize(RubyGems) | = 3.1.0 | No fix listed |
| rubygems sanitize(RubyGems) | = 3.1.1 | No fix listed |
| rubygems sanitize(RubyGems) | = 3.1.2 | No fix listed |
| rubygems sanitize(RubyGems) | = 4.0.0 | No fix listed |
| rubygems sanitize(RubyGems) | = 4.0.1 | No fix listed |
| rubygems sanitize(RubyGems) | = 4.1.0 | No fix listed |
| rubygems sanitize(RubyGems) | = 4.2.0 | No fix listed |
| rubygems sanitize(RubyGems) | = 4.3.0 | No fix listed |
| rubygems sanitize(RubyGems) | = 4.4.0 | No fix listed |
| rubygems sanitize(RubyGems) | = 4.5.0 | No fix listed |
| rubygems sanitize(RubyGems) | = 4.6.0 | No fix listed |
| rubygems sanitize(RubyGems) | = 4.6.1 | No fix listed |
| rubygems sanitize(RubyGems) | = 4.6.2 | No fix listed |
| rubygems sanitize(RubyGems) | = 4.6.3 | No fix listed |
| rubygems sanitize(RubyGems) | = 4.6.4 | No fix listed |
| rubygems sanitize(RubyGems) | = 4.6.5 | No fix listed |
| rubygems sanitize(RubyGems) | = 4.6.6 | No fix listed |
| rubygems sanitize(RubyGems) | = 5.0.0 | No fix listed |
| rubygems sanitize(RubyGems) | = 5.1.0 | No fix listed |
Show 20 more
| Product | Affected versions | Fixed in |
|---|---|---|
| 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 |
| rubygems sanitize(RubyGems) | = 6.0.1 | No fix listed |
| debian/ruby-sanitize(Debian:12) | < 6.0.0-1.1+deb12u1 | 6.0.0-1.1+deb12u1 |
| debian/ruby-sanitize(Debian:12) | = 6.0.0-1.1 | No fix listed |
| debian/ruby-sanitize(Debian:13) | < 6.0.2-1 | 6.0.2-1 |
| debian/ruby-sanitize(Debian:14) | < 6.0.2-1 | 6.0.2-1 |
| rgrove sanitize | = >= 3.0.0, < 6.0.2 | No fix listed |
| ubuntu/ruby-sanitize(Ubuntu:22.04) | < 6.0.0-1ubuntu0.1 | 6.0.0-1ubuntu0.1 |
| sanitize project sanitize | >= 3.0.0, < 6.0.2 | 6.0.2 |
| debian linux | = 10.0 | No fix listed |
| 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-f5ww-cq3m-q3g7 issue-tracking vendor-advisory
- nvd.nist.gov third-party-advisory vendor-advisory
- https://github.com/rgrove/sanitize/commit/76ed46e6dc70820f38efe27de8dabd54dddb5220 issue-tracking patch
- https://github.com/rgrove/sanitize/releases/tag/v6.0.2 issue-tracking release-notes
- github.com exploit
- lists.debian.org mailing-list
- github.com
- github.com product
- Debian Security Tracker CVE-2023-36823 vendor-advisory
- Ubuntu CVE tracker issue-tracking vendor-advisory
- USN-6748-1 vendor-advisory
- www.cve.org issue-tracking
- bugs.debian.org issue-tracking