Vulnerabilities · 2024 · Rubyonrails
CVE-2024-53987
Rubyonrails Rails Html Sanitizers vulnerability
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 "style" element is explicitly allowed and the "svg" or "math" element is not allowed. This vulnerability is fixed in 1.6.1.
Affected products
Rails Html Sanitizers. The exact versions are in the references.
What to do now
- Check your exposureFind out whether Rubyonrails Rails Html Sanitizers runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Limit access until thenIf you cannot update at once, take the system off the internet or restrict who can reach it.
References
- github.com/rails/rails-html-sanitizer/security/advisories/GHSA-2x5m-9ch4-qgrr · Vendor Advisory
- github.com/rails/rails-html-sanitizer/commit/f02ffbb8465e73920b6de0da940f5530f855965e · Patch
- nvd.nist.gov/vuln/detail/CVE-2024-53987
- github.com/rubysec/ruby-advisory-db/blob/master/gems/rails-html-sanitizer/CVE-2024-53987.y
- github.com/advisories/GHSA-2x5m-9ch4-qgrr
- nvd.nist.gov/vuln/detail/CVE-2024-53987
- cve.org/CVERecord?id=CVE-2024-53987
More vulnerabilities in Rubyonrails products
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.