Live threats

All CVEs / Rubyonrails

CVE-2024-53986Rubyonrails Rails Html Sanitizers

Low 2.3 No auth needed

Priority
29
CVSS 4.0
2.3
EPSS
0.8%
probability of exploitation in 30 days · percentile 52
Auth required
No
Published
Dec 2, 2024
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-79
SSVC (CISA)
Exploitation: none · Automatable: no · Technical impact: partial
Vector
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

What happens

rails-html-sanitizer is responsible for sanitizing HTML fragments in Rails applications. There is a possible XSS vulnerability with certain configurations of Rails::HTML::Sanitizer 1.6.0 when used with Rails >= 7.1.0. A possible XSS vulnerability with certain configurations of Rails::HTML::Sanitizer may allow an attacker to inject content if HTML5 sanitization is enabled and the application developer has overridden the sanitizer's allowed tags where the "math" and "style" elements are both explicitly allowed. This vulnerability is fixed in 1.6.1.

Original NVD text.

What to do

  1. Apply the vendor's security update for Rails Html Sanitizers.
  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.6.0 < 1.6.1 1.6.1 gem "rails-html-sanitizer", ">= 1.6.1"

Per OSV / GitHub Advisories (GHSA-638j-pmjw-jq48). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
rubyonrailsrails_html_sanitizers1.6.0

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.