{"schemaVersion":4,"id":"CVE-2024-53986","aliases":["UBUNTU-CVE-2024-53986","GHSA-638j-pmjw-jq48"],"status":"published","duplicateOf":null,"title":"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. 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.","dates":{"published":"2024-12-02T21:13:01.441Z","modified":"2024-12-03T14:33:51.139Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":6.1,"severity":"medium","version":"3.1","versionLabel":"v3.1","source":"NVD","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","computed":false,"selection":"backend-summary"},"metrics":[{"version":"4.0","versionLabel":"v4.0","source":"CVE.org","score":2.3,"severity":"low","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","exploitability":null,"impact":null,"computed":false},{"version":"4.0","versionLabel":"v4.0","source":"OSV · Ubuntu","score":2.3,"severity":"low","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","exploitability":null,"impact":null,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Ubuntu","score":6.1,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","exploitability":7.2,"impact":4.5,"computed":true},{"version":"4.0","versionLabel":"v4.0","source":"OSV · Rubygems","score":2.3,"severity":"low","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","exploitability":null,"impact":null,"computed":true},{"version":"4.0","versionLabel":"v4.0","source":"NVD","score":2.3,"severity":"low","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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":6.1,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.00503,"percentile":0.44661,"severity":"low","asOf":"2026-12-04T00:00:00.000Z","change":{"pp":0.027999999999999987,"baselineDate":"2026-11-04T00:00:00.000Z","baselineScore":0.00475},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-10-21T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-10-22T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-10-23T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-10-24T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-10-25T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-10-26T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-10-27T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-10-28T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-10-29T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-10-30T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-10-31T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-11-01T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-11-02T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-11-03T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-11-04T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-11-05T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-11-06T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-11-07T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-11-08T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-11-09T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-11-10T00:00:00.000Z","score":0.00503,"percentile":null},{"date":"2026-11-11T00:00:00.000Z","score":0.00503,"percentile":null},{"date":"2026-11-12T00:00:00.000Z","score":0.00503,"percentile":null},{"date":"2026-11-13T00:00:00.000Z","score":0.00503,"percentile":null},{"date":"2026-11-14T00:00:00.000Z","score":0.00503,"percentile":null},{"date":"2026-11-15T00:00:00.000Z","score":0.00503,"percentile":null},{"date":"2026-11-16T00:00:00.000Z","score":0.00503,"percentile":null},{"date":"2026-11-17T00:00:00.000Z","score":0.00503,"percentile":null},{"date":"2026-11-18T00:00:00.000Z","score":0.00503,"percentile":null},{"date":"2026-11-19T00:00:00.000Z","score":0.00503,"percentile":null},{"date":"2026-11-20T00:00:00.000Z","score":0.00503,"percentile":null},{"date":"2026-11-21T00:00:00.000Z","score":0.00503,"percentile":null},{"date":"2026-11-22T00:00:00.000Z","score":0.00503,"percentile":null},{"date":"2026-11-23T00:00:00.000Z","score":0.00503,"percentile":null},{"date":"2026-11-24T00:00:00.000Z","score":0.00503,"percentile":null},{"date":"2026-11-25T00:00:00.000Z","score":0.0077,"percentile":null},{"date":"2026-11-26T00:00:00.000Z","score":0.0077,"percentile":null},{"date":"2026-11-27T00:00:00.000Z","score":0.0077,"percentile":null},{"date":"2026-11-28T00:00:00.000Z","score":0.0077,"percentile":null},{"date":"2026-11-29T00:00:00.000Z","score":0.0077,"percentile":null},{"date":"2026-11-30T00:00:00.000Z","score":0.0077,"percentile":null},{"date":"2026-12-01T00:00:00.000Z","score":0.00503,"percentile":null},{"date":"2026-12-02T00:00:00.000Z","score":0.00503,"percentile":null},{"date":"2026-12-03T00:00:00.000Z","score":0.00503,"percentile":null},{"date":"2026-12-04T00:00:00.000Z","score":0.00503,"percentile":0.44661}],"last30":[{"date":"2026-11-04T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-11-05T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-11-06T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-11-07T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-11-08T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-11-09T00:00:00.000Z","score":0.00475,"percentile":null},{"date":"2026-11-10T00:00:00.000Z","score":0.00503,"percentile":null},{"date":"2026-11-11T00:00:00.000Z","score":0.00503,"percentile":null},{"date":"2026-11-12T00:00:00.000Z","score":0.00503,"percentile":null},{"date":"2026-11-13T00:00:00.000Z","score":0.00503,"percentile":null},{"date":"2026-11-14T00:00:00.000Z","score":0.00503,"percentile":null},{"date":"2026-11-15T00:00:00.000Z","score":0.00503,"percentile":null},{"date":"2026-11-16T00:00:00.000Z","score":0.00503,"percentile":null},{"date":"2026-11-17T00:00:00.000Z","score":0.00503,"percentile":null},{"date":"2026-11-18T00:00:00.000Z","score":0.00503,"percentile":null},{"date":"2026-11-19T00:00:00.000Z","score":0.00503,"percentile":null},{"date":"2026-11-20T00:00:00.000Z","score":0.00503,"percentile":null},{"date":"2026-11-21T00:00:00.000Z","score":0.00503,"percentile":null},{"date":"2026-11-22T00:00:00.000Z","score":0.00503,"percentile":null},{"date":"2026-11-23T00:00:00.000Z","score":0.00503,"percentile":null},{"date":"2026-11-24T00:00:00.000Z","score":0.00503,"percentile":null},{"date":"2026-11-25T00:00:00.000Z","score":0.0077,"percentile":null},{"date":"2026-11-26T00:00:00.000Z","score":0.0077,"percentile":null},{"date":"2026-11-27T00:00:00.000Z","score":0.0077,"percentile":null},{"date":"2026-11-28T00:00:00.000Z","score":0.0077,"percentile":null},{"date":"2026-11-29T00:00:00.000Z","score":0.0077,"percentile":null},{"date":"2026-11-30T00:00:00.000Z","score":0.0077,"percentile":null},{"date":"2026-12-01T00:00:00.000Z","score":0.00503,"percentile":null},{"date":"2026-12-02T00:00:00.000Z","score":0.00503,"percentile":null},{"date":"2026-12-03T00:00:00.000Z","score":0.00503,"percentile":null},{"date":"2026-12-04T00:00:00.000Z","score":0.00503,"percentile":0.44661}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation","description":"The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.","type":"weakness","status":"Stable","abstraction":"Base","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/79.html"}],"affected":[{"vendor":"ubuntu","product":"ruby-rails-html-sanitizer","name":"ruby-rails-html-sanitizer","label":"ruby-rails-html-sanitizer","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/ruby-rails-html-sanitizer","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null,"bounds":{"kind":"all"}}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"RubyGems","product":"rails-html-sanitizer","name":"rails-html-sanitizer","label":"rails-html-sanitizer","ecosystem":"RubyGems","cpePart":null,"purl":"pkg:gem/rails-html-sanitizer","purlType":"gem","versions":[{"text":"≥ 1.6.0, < 1.6.1","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":"1.6.0","startInclusive":true,"end":"1.6.1","endInclusive":false}}],"versionsText":"≥ 1.6.0, < 1.6.1","eol":null,"hubHref":null},{"vendor":"rails","product":"rails-html-sanitizer","name":"rails-html-sanitizer","label":"rails-html-sanitizer","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 1.6.0, < 1.6.1","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":"1.6.0","startInclusive":true,"end":"1.6.1","endInclusive":false}}],"versionsText":"≥ 1.6.0, < 1.6.1","eol":null,"hubHref":"/vendor/rails/rails-html-sanitizer"},{"vendor":"rubyonrails","product":"rails_html_sanitizers","name":"rails html sanitizers","label":"rails_html_sanitizers","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"1.6.0","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"exact","version":"1.6.0"}}],"versionsText":"1.6.0","eol":null,"hubHref":"/vendor/rubyonrails/rails_html_sanitizers"}],"affectedCount":4,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-638j-pmjw-jq48","label":"github.com/rails/rails-html-sanitizer/security/advisories/GHSA-638j-pmjw-jq48","hostname":"github.com","tags":["X Refsource CONFIRM","REPORT","WEB","Vendor Advisory"]},{"url":"https://github.com/rails/rails-html-sanitizer/commit/f02ffbb8465e73920b6de0da940f5530f855965e","label":"github.com/rails/rails-html-sanitizer/commit/f02ffbb8465e73920b6de0da940f5530f855965e","hostname":"github.com","tags":["X Refsource MISC","REPORT","WEB","Patch"]},{"url":"https://ubuntu.com/security/CVE-2024-53986","label":"ubuntu.com/security/CVE-2024-53986","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2024-53986","label":"www.cve.org/CVERecord?id=CVE-2024-53986","hostname":"www.cve.org","tags":["REPORT"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-53986","label":"nvd.nist.gov/vuln/detail/CVE-2024-53986","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/rails/rails-html-sanitizer","label":"github.com/rails/rails-html-sanitizer","hostname":"github.com","tags":["PACKAGE"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rails-html-sanitizer/CVE-2024-53986.yml","label":"github.com/rubysec/ruby-advisory-db/blob/master/gems/rails-html-sanitizer/CVE-2024-53986.yml","hostname":"github.com","tags":["WEB"]}],"lineage":{"upstream":[],"downstream":["OPENSUSE-SU-2026:10569-1"],"duplicates":[],"related":["OPENSUSE-SU-2026:10569-1"]},"timeline":[{"kind":"published","date":"2024-12-02T21:13:01.441Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2024-12-03T14:33:51.139Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"priority":{"label":"routine","tag":null,"reason":"Not severe (CVSS 2.3, network access); no exploitation reported by the 5 checked sources","nextStep":"Fix in the normal cadence","rank":[0,0,0,0,1,23],"checkedSources":["cisa","enisa","circl","shadowserver","cisa-adp"],"evidence":[{"type":"epss","source":"FIRST","date":"2026-12-04T00:00:00.000Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"value":0.00503,"stale":false,"promoted":null},{"type":"cvss","source":"cve.org","date":"2024-12-03T14:33:51.139Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":2.3,"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","version":"4.0","headline":true},{"type":"cvss","source":"osv_ubuntu","date":"2024-12-03T14:33:51.139Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":2.3,"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","version":"4.0"},{"type":"cvss","source":"osv_ubuntu","date":"2024-12-03T14:33:51.139Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","version":"3.1"},{"type":"cvss","source":"osv_rubygems","date":"2024-12-03T14:33:51.139Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":2.3,"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","version":"4.0"},{"type":"cvss","source":"nvd","date":"2024-12-03T14:33:51.139Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":2.3,"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","version":"4.0"},{"type":"cvss","source":"nvd","date":"2024-12-03T14:33:51.139Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","version":"3.1"},{"type":"adp","source":"cisa-adp","date":"2024-12-03T14:33:42.695Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"exploitation":"none"}],"epss":{"value":0.00503,"date":"2026-12-04T00:00:00.000Z","stale":false,"promoted":null},"sources":[{"id":"cisa","lastSuccessfulSync":"2026-12-05T13:01:25.582Z","state":"fresh"},{"id":"enisa","lastSuccessfulSync":"2026-12-05T13:01:26.078Z","state":"fresh"},{"id":"circl","lastSuccessfulSync":"2026-12-05T12:01:28.919Z","state":"stale"},{"id":"shadowserver","lastSuccessfulSync":null,"state":"unavailable"},{"id":"cisa-adp","lastSuccessfulSync":"2026-12-05T13:01:07.092Z","state":"fresh"},{"id":"epss","lastSuccessfulSync":"2026-12-05T13:01:23.911Z","state":"fresh"},{"id":"osv","lastSuccessfulSync":"2026-12-05T13:01:22.884Z","state":"fresh"}],"feedEvent":null},"meta":{"dataAsOf":"2026-12-05T13:22:54.617Z","stale":false,"partial":false}}