Live threats

All CVEs / Rubyonrails

CVE-2018-3741Rubyonrails Html Sanitizer

Medium 6.1 No auth needed

Priority
52
CVSS 3.1
6.1
EPSS
1.3%
probability of exploitation in 30 days · percentile 69
Auth required
No
Published
Mar 30, 2018
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-79
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Html Sanitizer.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
RubyGems rails-html-sanitizer < 1.0.4 1.0.4 gem "rails-html-sanitizer", ">= 1.0.4"

Per OSV / GitHub Advisories (GHSA-px3r-jm9g-c8w8). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
rubyonrailshtml_sanitizer≤ 1.0.3

Official advisories

Vendor, CERT and distribution advisories that name this CVE. Original titles.

Official sources

References

Links published by the sources. Open them with care.

  • github.com Issue Tracking Patch Third Party Advisory