{"id":"CVE-2024-53988","published":"2024-12-02T21:09:56Z","modified":"2024-12-03T14:34:23Z","title":"Possible XSS vulnerability with certain configurations of rails-html-sanitizer 1.6.0","vendor":"rails","product":"rails-html-sanitizer","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":2.3,"severity":"LOW","version":"4.0","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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00725,"percentile":0.49936,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-cfjx-w229-hgx5","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/rails/rails-html-sanitizer/commit/a0a3e8b76b696446ffc6bffcff3bc7b7c6393c72","tags":["x_refsource_MISC"]}],"priority":{"score":11.6,"factors":[{"name":"EPSS percentile","points":9.99},{"name":"CVSS severity","points":1.61}]},"vendorSlug":"rails","affectedVersions":[{"vendor":"rails","product":"rails-html-sanitizer","versions":[">= 1.6.0, < 1.6.1"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2024-12-03T14:34:13.985525Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"RubyGems","package":"rails-html-sanitizer","vulnerableRanges":[">=1.6.0, <1.6.1"],"patched":["1.6.1"],"from":["GHSA-cfjx-w229-hgx5"],"provenance":"source"}],"summary":{"text":"The rails-html-sanitizer library (vendor: rails, product: rails-html-sanitizer) has a possible cross-site scripting flaw in its HTML sanitization of version 1.6.0, which affects Rails 7.1.0 and later when HTML5 sanitization is enabled. An attacker could inject script content if the application has overridden the allowed tags to permit \"math\", \"mtext\", \"table\", and \"style\" together with either \"mglyph\" or \"malignmark\", and exploitation requires a user to interact with the crafted content.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:11:24Z"},"euvd":{"id":"EUVD-2024-3460","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-rails-html-sanitizer-cve-2015-7578","parents":[{"from":"CVE-2015-7578","to":"CVE-2024-53988","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["lib/rails/html/scrubbers.rb"],"commits":["https://github.com/rails/rails-html-sanitizer/commit/297161e29a3e11186ce4c02bf7defc088bf544d4","https://github.com/rails/rails-html-sanitizer/commit/a0a3e8b76b696446ffc6bffcff3bc7b7c6393c72"],"basis":"shared function","functions":["validate"]}]}],"children":[{"from":"CVE-2024-53988","to":"CVE-2024-53989","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["lib/rails/html/scrubbers.rb"],"commits":["https://github.com/rails/rails-html-sanitizer/commit/a0a3e8b76b696446ffc6bffcff3bc7b7c6393c72","https://github.com/rails/rails-html-sanitizer/commit/16251735e36ebdc302e2f90f2a39cad56879414f"],"basis":"shared function","functions":["validate"]}]},{"from":"CVE-2024-53988","to":"CVE-2026-128068","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["lib/rails/html/scrubbers.rb"],"commits":["https://github.com/rails/rails-html-sanitizer/commit/a0a3e8b76b696446ffc6bffcff3bc7b7c6393c72","https://github.com/rails/rails-html-sanitizer/commit/f776f963b9d9346271aade9cb903e793fd38e865"],"basis":"shared function","functions":["validate"]}]}]}}