Skip to main content
No exploitation reportedFix available

CVE-2024-53986

No exploitation reported by the sources we read.

  • Published2024-12-02
  • Fixed in1.6.1
  • WeaknessCWE-79

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

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.

Timeline

dates in UTC
  1. 2024-12-0222:15CVE publishedNVD

Versions per branch

OSV · NVD
rails-html-sanitizer
BranchAffectedFixed in
1.6≥ 1.6.0, < 1.6.11.6.1
Rubyonrails rails html sanitizers
BranchAffectedFixed in
1.6= 1.6.0no fix published

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Products declared by the CNA1 product

As GitHub_M, the CNA that assigned this CVE, declared them in the CVE record; versions as written.

  • rails-html-sanitizer
    Affected
    • = >= 1.6.0, < 1.6.1no fix stated

Source: the CNA record (CVE Program), © The MITRE Corporation,CVE terms of useCVE recordupdated 2024-12-02

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • ruby-rails-html-sanitizerUbuntu:Pro:22.04:LTSall versions · no fixed version listed
  • ruby-rails-html-sanitizerUbuntu:Pro:20.04:LTSall versions · no fixed version listed
  • ruby-rails-html-sanitizerUbuntu:Pro:18.04:LTSall versions · no fixed version listed
  • ruby-rails-html-sanitizerUbuntu:Pro:16.04:LTSall versions · no fixed version listed
  • ruby-rails-html-sanitizerUbuntu:26.10all versions · no fixed version listed
  • ruby-rails-html-sanitizerUbuntu:26.04:LTSall versions · no fixed version listed
  • ruby-rails-html-sanitizerUbuntu:25.10all versions · no fixed version listed
  • ruby-rails-html-sanitizerUbuntu:24.04:LTSall versions · no fixed version listed

1 more package range on OSV.dev

Vendor advisories

  • CVE-2024-53986 Red Hat Product Security2 known affected

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

    3scale-amp2/zync-rhel8 as a component of Red Hat 3scale API Management Platform 2 · satellite:el8/rubygem-rails-html-sanitizer.src as a component of Red Hat Satellite 6

Full record on NVD

Fix

  1. Update rails-html-sanitizer to 1.6.1
  2. No fix available, says the vendor Red Hat Product Security CVE-2024-53986 · 2 productsFix deferred

Advisories and patches

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

  • CISA-ADPSSVC decisionnone2024-12-03
  • CNACVSS 4.02.3known since 2026-10-23
  • NVDCVSS 3.16.1read 2026-10-23
  • CNAweakness (CWE)CWE-79known since 2026-10-23
  • FIRST EPSSEPSS score0.5 %2026-12-04
  • OSVaffected packages—
  • GitHub AdvisoriesadvisoryLow2024-12-02

Identifiers

Technical details

CVSS v3 vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
CVSS 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/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
Published
2024-12-02
Last modified
2026-06-17
NVD status
Analyzed
GitHub advisory
GHSA-638j-pmjw-jq48

Frequently asked questions

What is CVE-2024-53986?

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.

Is CVE-2024-53986 actively exploited?

Active exploitation of CVE-2024-53986 has not been confirmed. Its EPSS score was 0.5% on 2026-12-04, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2024-53986?

CVE-2024-53986 has a CVSS v3 base score of 6.1 (Medium severity), with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.

Running rails-html-sanitizer? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website checks · 250 API requests/month

Sources for this record