SecurityContext

CVE-2018-3741: rails-html-sanitizer - Stored XSS

  • Cve: CVE-2018-3741
  • Name: rails-html-sanitizer - Stored XSS
  • Description: There is a possible XSS vulnerability in all rails-html-sanitizer gem versions below 1.0.4 for Ruby. The gem allows non-whitelisted attributes to be present in sanitized output when input with specially-crafted HTML fragments, and these attributes can lead to an XSS attack on target applications. This issue is similar to CVE-2018-8048 in Loofah. All users running an affected release should either upgrade or use one of the workarounds immediately.
  • Impact: Attackers can execute malicious scripts in victim browsers, leading to session hijacking, data theft, or defacement.
  • Remediation: Upgrade to version 1.0.4 or later, or apply available workarounds immediately.
  • Vulnerability type: stored_xss
  • Vulnerability impact: client_script_exec
  • Requirement type: none
  • Labels source: projectdiscovery
  • Severity: medium
  • Cvss score: 6.1
  • Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
  • Epss score: 0.01253
  • Epss percentile: 0.70208
  • Assignee: [email protected]
  • Published at: 2018-03-30T19:29:00Z
  • Age in days: 3161
  • Modified at: 2026-06-17T01:57:45Z
  • Patch available: yes
  • References total: 1
  • Products total: 1
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2018-3741
  • Nvd status: modified
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
  • Not known: requirements

Cwe

IdName
CWE-79Improper Neutralization of Input During Web Page Generation

Hackerone

  • Reports: 4
  • Rank: 1334

References

UrlSourceTags
https://github.com/rails/rails-html-sanitizer/commit/f3ba1a839a35f2ba7f941c15e239a1cb379d56aenvdIssue Tracking, Patch, Third Party Advisory

Products

ProductAffectedPlatform boundSourcesUrl
rubyonrails:html_sanitizer<= 1.0.3nonvd/v1/products/rubyonrails/html_sanitizer

Projects

RepositoryLink kindsIndexedUrl
rails/rails-html-sanitizercommit, fix, packageyes/v1/repositories/rails/rails-html-sanitizer

Index

  • Repositories: 9
  • Packages: 1
  • Checked, none or zero: repositories high signal

Exploitation

  • Remote: yes
  • Hackerone reports: 4
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, authentication required
  • Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, exposed hosts