{"cve":"CVE-2024-53986","nvd":{"published":"2024-12-02T22:15:11.343","modified":"2026-06-17T08:09:37.190","status":"Analyzed","description":"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.","cvss_v4":{"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","score":2.3},"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1},"cwes":["CWE-79"],"references":["https://github.com/rails/rails-html-sanitizer/commit/f02ffbb8465e73920b6de0da940f5530f855965e","https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-638j-pmjw-jq48"],"products":["rubyonrails:rails_html_sanitizers"],"source":"nvd","synced_at":"2026-10-19T21:57:36.180738747+00:00"},"epss":{"cve":"CVE-2024-53986","score":0.00475,"percentile":0.41052,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-638j-pmjw-jq48","url":"https://osv.dev/vulnerability/GHSA-638j-pmjw-jq48","summary":"rails-html-sanitizer has XSS vulnerability with certain configurations","modified":"2024-12-03T18:50:30Z","packages":[{"ecosystem":"RubyGems","name":"rails-html-sanitizer","purl":"pkg:gem/rails-html-sanitizer","ranges":[">=1.6.0 <1.6.1"],"fixed":["1.6.1"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}