CVE-2020-4054 Cross-site Scripting in Sanitize
- Published
- Updated
- Exploit status
- Proof-of-concept only
- Technology
- UbuntuDebian
Description
In Sanitize (RubyGem sanitize) greater than or equal to 3.0.0 and less than 5.2.1, there is a cross-site scripting vulnerability. When HTML is sanitized using Sanitize's "relaxed" config, or a custom config that allows certain elements, some content in a math or svg element may not be sanitized correctly even if math and svg are not in the allowlist. You are likely to be vulnerable to this issue if you use Sanitize's relaxed config or a custom config that allows one or more of the following HTML elements: iframe, math, noembed, noframes, noscript, plaintext, script, style, svg, xmp. Using carefully crafted input, an attacker may be able to sneak arbitrary HTML through Sanitize, potentially resulting in XSS (cross-site scripting) or other undesired behavior when that HTML is rendered in a browser. This has been fixed in 5.2.1.
Upgrade path
9 packages: 6 fixed, 2 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| ubuntu/ruby-sanitize(Ubuntu 16.04) | = 2.1.0-1; = 2.1.0-2; = 2.1.0-2+deb9u1build0.16.04.1; All versions | No fix listed | No fix yet |
| ubuntu/ruby-sanitize(Ubuntu 18.04) | = 2.1.0-2; = 2.1.0-2+deb9u1build0.18.04.1; All versions | No fix listed | No fix yet |
| debian/ruby-sanitize(Debian 12) | < 4.6.6-2.1 | 4.6.6-2.1 | Fixed |
| debian/ruby-sanitize(Debian 13) | < 4.6.6-2.1 | 4.6.6-2.1 | Fixed |
| debian/ruby-sanitize(Debian 14) | < 4.6.6-2.1 | 4.6.6-2.1 | Fixed |
| rubygems sanitize(RubyGems) | = 3.0.0; = 3.0.1; = 3.0.2; = 3.0.3 +22 more | 5.2.1 | Fixed |
| sanitize project sanitize | >= 3.0.0, < 5.2.1 | 5.2.1 | Fixed |
| ubuntu/ruby-sanitize(Ubuntu 20.04) | < 4.6.6-2.1~0.20.04.1; = 4.6.6-2 | 4.6.6-2.1~0.20.04.1 | Fixed |
| rgrove sanitize | = >= 3.0.0, < 5.2.1 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| rubygems sanitize(RubyGems) | >= 3.0.0, < 5.2.1 | 5.2.1 |
| 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 15 more
| Product | Affected versions | Fixed in |
|---|---|---|
| rubygems sanitize(RubyGems) | = 5.2.0 | No fix listed |
| debian/ruby-sanitize(Debian:12) | < 4.6.6-2.1 | 4.6.6-2.1 |
| debian/ruby-sanitize(Debian:13) | < 4.6.6-2.1 | 4.6.6-2.1 |
| debian/ruby-sanitize(Debian:14) | < 4.6.6-2.1 | 4.6.6-2.1 |
| sanitize project sanitize | >= 3.0.0, < 5.2.1 | 5.2.1 |
| rgrove sanitize | = >= 3.0.0, < 5.2.1 | No fix listed |
| ubuntu/ruby-sanitize(Ubuntu:16.04) | All versions | No fix listed |
| ubuntu/ruby-sanitize(Ubuntu:16.04) | = 2.1.0-1 | No fix listed |
| ubuntu/ruby-sanitize(Ubuntu:16.04) | = 2.1.0-2 | No fix listed |
| ubuntu/ruby-sanitize(Ubuntu:16.04) | = 2.1.0-2+deb9u1build0.16.04.1 | No fix listed |
| ubuntu/ruby-sanitize(Ubuntu:18.04) | All versions | No fix listed |
| ubuntu/ruby-sanitize(Ubuntu:18.04) | = 2.1.0-2 | No fix listed |
| ubuntu/ruby-sanitize(Ubuntu:18.04) | = 2.1.0-2+deb9u1build0.18.04.1 | No fix listed |
| ubuntu/ruby-sanitize(Ubuntu:20.04) | < 4.6.6-2.1~0.20.04.1 | 4.6.6-2.1~0.20.04.1 |
| ubuntu/ruby-sanitize(Ubuntu:20.04) | = 4.6.6-2 | No fix listed |
References
- github.com issue-tracking third-party-advisory vendor-advisory
- github.com issue-tracking patch third-party-advisory
- github.com issue-tracking release-notes third-party-advisory
- nvd.nist.gov third-party-advisory vendor-advisory
- DSA-4730 vendor-advisory
- USN-4543-1 vendor-advisory
- github.com exploit
- github.com
- github.com product
- Debian Security Tracker CVE-2020-4054 vendor-advisory
- bugs.debian.org issue-tracking
- ubuntu.com issue-tracking
- ubuntu.com vendor-advisory
- www.cve.org issue-tracking