CVE-2018-3741
Description
There is a possible XSS vulnerability in all rails-html-sanitizer gem versions below 1.0.4 for Ruby. The gem allows non-whitelisted attributes to be present in sanitized output when input with specially-crafted HTML fragments, and these attributes can lead to an XSS attack on target applications. This issue is similar to CVE-2018-8048 in Loofah. All users running an affected release should either upgrade or use one of the workarounds immediately.
Predictions
Heuristic predictions, AS-IS, for prioritization only.
Mitigations
No mitigations published for this CVE yet.
The vendor-content worker queues fetches as references arrive (check back in a few minutes). Or โ if you've already worked around this in production โ publish your fix to the community-verified tier.
โ Propose a mitigation on Community โ Mitigations published via the community go through AI scoring + 2 human reviewers + 7-day silent objection window before landing here withsource_tier=community-verified.
OS impact
| OS | Version | Status | Fixed in |
|---|---|---|---|
| sles | affected | | |
| debian | bookworm | fixed | 1.0.4-1 |
| debian | bullseye | fixed | 1.0.4-1 |
| debian | forky | fixed | 1.0.4-1 |
| debian | sid | fixed | 1.0.4-1 |
| debian | trixie | fixed | 1.0.4-1 |
Package impact
| Ecosystem | Package | Vulnerable | Fixed |
|---|---|---|---|
| RubyGems | rails-html-sanitizer | <>= 1.0.4 | >= 1.0.4 |
| RubyGems | rails-html-sanitizer | <1.0.4 | 1.0.4 |
References
- https://groups.google.com/d/msg/rubyonrails-security/tP7W3kLc5u4/uDy2Br7xBgAJ
- https://www.suse.com/security/cve/CVE-2018-3741.html
- https://nvd.nist.gov/vuln/detail/CVE-2018-3741
- https://github.com/rails/rails-html-sanitizer/commit/f3ba1a839a35f2ba7f941c15e239a1cb379d56ae
- https://github.com/rails/rails-html-sanitizer
- https://security-tracker.debian.org/tracker/CVE-2018-3741
Community-verified mitigations for this CVE will appear above when contributors publish them.
Verify integrity in audit chain (admin only). AS-IS.