# CVE-2024-53988: Possible XSS vulnerability with certain configurations of rails-html-sanitizer 1.6.0

- Severity: Low 2.3 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.47%, higher than 42% of CVEs (2026-12-01)
- Published: 2024-12-02T21:09:56.440Z
- Modified: 2026-06-17T08:09:37.420Z
- Also known as: GHSA-cfjx-w229-hgx5
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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", "mtext", "table", and "style" elements are allowed and either either "mglyph" or "malignmark" are allowed. This vulnerability is fixed in 1.6.1.

(As written by CVE List.)

## Affected

- rails rails-html-sanitizer: >= 1.6.0, < 1.6.1
- rails-html-sanitizer (RubyGems): from 1.6.0 before 1.6.1
- rubyonrails rails_html_sanitizers: 1.6.0

## Every score

- GitHub_M: CVSS:4.0 2.3 Low `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`
- GitHub: CVSS:4.0 Low `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`
- NVD: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-cfjx-w229-hgx5> (vendor-advisory, web)
- <https://github.com/rails/rails-html-sanitizer/commit/a0a3e8b76b696446ffc6bffcff3bc7b7c6393c72> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-53988> (advisory)
- <https://github.com/rails/rails-html-sanitizer> (package)
- <https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rails-html-sanitizer/CVE-2024-53988.yml> (web)

## Sources

- CVE List: [CVE-2024-53988](https://www.cve.org/CVERecord?id=CVE-2024-53988), CVE Terms of Use, modified 2024-12-03
- GitHub Advisory Database: [GHSA-cfjx-w229-hgx5](https://github.com/advisories/GHSA-cfjx-w229-hgx5), CC-BY-4.0, modified 2024-12-03
- NVD: [CVE-2024-53988](https://nvd.nist.gov/vuln/detail/CVE-2024-53988), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-53988 · Whole record: https://cve.day/CVE-2024-53988.json · Rebuilt by cve.day 2026-11-25T22:58:49.650Z
