CVE-2024-53985

Possible XSS vulnerability with certain configurations of rails-html-sanitizer 1.6.0

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 and Nokogiri < 1.15.7, or 1.16.x < 1.16.8. The 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 with both "math" and "style" elements or both both "svg" and "style" elements. This vulnerability is fixed in 1.6.1.

Category

2.3
CVSS
Severity: Low
CVSS 4.0 •
EPSS 0.12%
Affected: rails rails-html-sanitizer
Published at:
Updated at:

References

Frequently Asked Questions

What is the severity of CVE-2024-53985?
CVE-2024-53985 has been scored as a low severity vulnerability.
How to fix CVE-2024-53985?
To fix CVE-2024-53985, make sure you are using an up-to-date version of the affected component(s) by checking the vendor release notes. As for now, there are no other specific guidelines available.
Is CVE-2024-53985 being actively exploited in the wild?
As for now, there are no information to confirm that CVE-2024-53985 is being actively exploited. According to its EPSS score, there is a ~0% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2024-53985?
CVE-2024-53985 affects rails rails-html-sanitizer.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.