SecurityContext

CVE-2022-23520: rails-html-sanitizer - Stored XSS

  • Cve: CVE-2022-23520
  • Name: rails-html-sanitizer - Stored XSS
  • Description: rails-html-sanitizer is responsible for sanitizing HTML fragments in Rails applications. Prior to version 1.4.4, there is a possible XSS vulnerability with certain configurations of Rails::Html::Sanitizer due to an incomplete fix of CVE-2022-32209. Rails::Html::Sanitizer may allow an attacker to inject content if the application developer has overridden the sanitizer's allowed tags to allow both "select" and "style" elements. Code is only impacted if allowed tags are being overridden. This issue is patched in version 1.4.4. All users overriding the allowed tags to include both "select" and "style" should either upgrade or use this workaround: Remove either "select" or "style" from the overridden allowed tags. NOTE: Code is _not_ impacted if allowed tags are overridden using either the :tags option to the Action View helper method sanitize or the :tags option to the instance method SafeListSanitizer#sanitize.
  • Impact: Attackers can inject malicious scripts into web pages, leading to potential theft of user data or session hijacking.
  • Remediation: Upgrade to version 1.4.4 or later, or remove either 'select' or 'style' from the overridden allowed tags.
  • Vulnerability type: stored_xss
  • Vulnerability impact: client_script_exec, information_disclosure
  • 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.01209
  • Epss percentile: 0.69188
  • Assignee: [email protected]
  • Published at: 2022-12-14T18:15:17Z
  • Age in days: 1441
  • Modified at: 2026-06-17T04:30:17Z
  • Patch available: yes
  • Public exploits total: 2
  • References total: 4
  • Products total: 2
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2022-23520
  • Nvd status: modified
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits capped, rejected by nvd
  • Not known: requirements

Cwe

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

Hackerone

  • Reports: 4
  • Rank: 2839

Public exploits

UrlSourceAdded date
https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-rrfc-7g8p-99q8nvd2022-12-14
https://hackerone.com/reports/1654310nvd2022-12-14

References

Same in every row:

  • Source: nvd
UrlTags
https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-rrfc-7g8p-99q8Exploit, Third Party Advisory
https://hackerone.com/reports/1654310Exploit, Third Party Advisory
https://lists.debian.org/debian-lts-announce/2023/09/msg00012.htmlMailing List, Third Party Advisory
https://lists.debian.org/debian-lts-announce/2024/09/msg00045.html

Products

ProductAffectedPlatform boundSourcesUrl
debian:debian_linux= 10.0nonvd/v1/products/debian/debian_linux
rubyonrails:rails_html_sanitizers< 1.4.4nonvd/v1/products/rubyonrails/rails_html_sanitizers

Projects

RepositoryLink kindsIndexedUrl
rails/rails-html-sanitizerpackage, security_advisoryyes/v1/repositories/rails/rails-html-sanitizer

Index

  • Repositories: 50
  • Repositories high signal: 7
  • Packages: 1

Exploitation

  • Public exploit: yes
  • Public exploit count: 2
  • Public exploit first date: 2022-12-14
  • Remote: yes
  • Hackerone reports: 4
  • Exposed hosts: 4739835
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access, authentication required
  • Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since