CVE-2024-53988Rubyonrails Rails Html Sanitizers
Low 2.3 No auth needed
Follow: this CVE · Rubyonrails · Rubyonrails Rails Html Sanitizers We alert you by email or Slack (account required).
- Priority
- 29
- CVSS 4.0
- 2.3
- EPSS
- 0.7% probability of exploitation in 30 days · percentile 50
- 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", "mtext", "table", and "style" elements are allowed and either either "mglyph" or "malignmark" are allowed. This vulnerability is fixed in 1.6.1.
What to do
- Apply the vendor's security update for Rails Html Sanitizers.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How 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-cfjx-w229-hgx5). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| rubyonrails | rails_html_sanitizers | 1.6.0 |
Official advisories
- ruby4.0-rubygem-rails-html-sanitizer-1.7.0-1.1 on GA media · SUSE · openSUSE-SU-2026:10569-1 · Apr 17, 2026 Low
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 Patch
- github.com Vendor Advisory