Search for vulnerabilities
Vulnerability details: VCID-u9bs-nhvv-ruf6
Vulnerability ID VCID-u9bs-nhvv-ruf6
Aliases CVE-2022-23519
GHSA-9h9g-93gc-623h
GMS-2022-8299
Summary Possible XSS vulnerability with certain configurations of rails-html-sanitizer ## Summary There is a possible XSS vulnerability with certain configurations of Rails::Html::Sanitizer. - Versions affected: ALL - Not affected: NONE - Fixed versions: 1.4.4 ## Impact A possible XSS vulnerability with certain configurations of Rails::Html::Sanitizer may allow an attacker to inject content if the application developer has overridden the sanitizer's allowed tags in either of the following ways: - allow both "math" and "style" elements, - or allow both "svg" and "style" elements Code is only impacted if allowed tags are being overridden. Applications may be doing this in four different ways: 1. using application configuration: ```ruby # In config/application.rb config.action_view.sanitized_allowed_tags = ["math", "style"] # or config.action_view.sanitized_allowed_tags = ["svg", "style"] ``` see https://guides.rubyonrails.org/configuring.html#configuring-action-view 2. using a `:tags` option to the Action View helper `sanitize`: ``` <%= sanitize @comment.body, tags: ["math", "style"] %> <%# or %> <%= sanitize @comment.body, tags: ["svg", "style"] %> ``` see https://api.rubyonrails.org/classes/ActionView/Helpers/SanitizeHelper.html#method-i-sanitize 3. using Rails::Html::SafeListSanitizer class method `allowed_tags=`: ```ruby # class-level option Rails::Html::SafeListSanitizer.allowed_tags = ["math", "style"] # or Rails::Html::SafeListSanitizer.allowed_tags = ["svg", "style"] ``` 4. using a `:tags` options to the Rails::Html::SafeListSanitizer instance method `sanitize`: ```ruby # instance-level option Rails::Html::SafeListSanitizer.new.sanitize(@article.body, tags: ["math", "style"]) # or Rails::Html::SafeListSanitizer.new.sanitize(@article.body, tags: ["svg", "style"]) ``` All users overriding the allowed tags by any of the above mechanisms to include (("math" or "svg") and "style") should either upgrade or use one of the workarounds immediately. ## Workarounds Remove "style" from the overridden allowed tags, or remove "math" and "svg" from the overridden allowed tags.
Status Published
Exploitability 0.5
Weighted Severity 6.5
Risk 3.2
Affected and Fixed Packages Package Details
Weaknesses (3)
System Score Found at
cvssv3 7.2 https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2022-23519.json
epss 0.001 https://api.first.org/data/v1/epss?cve=CVE-2022-23519
epss 0.001 https://api.first.org/data/v1/epss?cve=CVE-2022-23519
epss 0.001 https://api.first.org/data/v1/epss?cve=CVE-2022-23519
epss 0.00152 https://api.first.org/data/v1/epss?cve=CVE-2022-23519
epss 0.00152 https://api.first.org/data/v1/epss?cve=CVE-2022-23519
epss 0.00152 https://api.first.org/data/v1/epss?cve=CVE-2022-23519
epss 0.00152 https://api.first.org/data/v1/epss?cve=CVE-2022-23519
epss 0.00152 https://api.first.org/data/v1/epss?cve=CVE-2022-23519
epss 0.00152 https://api.first.org/data/v1/epss?cve=CVE-2022-23519
epss 0.00152 https://api.first.org/data/v1/epss?cve=CVE-2022-23519
epss 0.00152 https://api.first.org/data/v1/epss?cve=CVE-2022-23519
epss 0.00152 https://api.first.org/data/v1/epss?cve=CVE-2022-23519
epss 0.00152 https://api.first.org/data/v1/epss?cve=CVE-2022-23519
epss 0.00152 https://api.first.org/data/v1/epss?cve=CVE-2022-23519
epss 0.00152 https://api.first.org/data/v1/epss?cve=CVE-2022-23519
epss 0.00152 https://api.first.org/data/v1/epss?cve=CVE-2022-23519
epss 0.00152 https://api.first.org/data/v1/epss?cve=CVE-2022-23519
epss 0.00152 https://api.first.org/data/v1/epss?cve=CVE-2022-23519
epss 0.00152 https://api.first.org/data/v1/epss?cve=CVE-2022-23519
epss 0.00152 https://api.first.org/data/v1/epss?cve=CVE-2022-23519
epss 0.00152 https://api.first.org/data/v1/epss?cve=CVE-2022-23519
epss 0.00152 https://api.first.org/data/v1/epss?cve=CVE-2022-23519
epss 0.00152 https://api.first.org/data/v1/epss?cve=CVE-2022-23519
epss 0.00152 https://api.first.org/data/v1/epss?cve=CVE-2022-23519
epss 0.00152 https://api.first.org/data/v1/epss?cve=CVE-2022-23519
epss 0.00157 https://api.first.org/data/v1/epss?cve=CVE-2022-23519
epss 0.00157 https://api.first.org/data/v1/epss?cve=CVE-2022-23519
cvssv3.1 7.2 https://ftp.suse.com/pub/projects/security/yaml/suse-cvss-scores.yaml
cvssv3.1_qr MODERATE https://github.com/advisories/GHSA-9h9g-93gc-623h
cvssv3.1 6.1 https://github.com/rails/rails-html-sanitizer
generic_textual MODERATE https://github.com/rails/rails-html-sanitizer
cvssv3 6.1 https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-9h9g-93gc-623h
cvssv3.1 6.1 https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-9h9g-93gc-623h
cvssv3.1_qr MODERATE https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-9h9g-93gc-623h
generic_textual MODERATE https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-9h9g-93gc-623h
cvssv3.1 6.1 https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rails-html-sanitizer/CVE-2022-23519.yml
generic_textual MODERATE https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rails-html-sanitizer/CVE-2022-23519.yml
cvssv3.1 6.1 https://hackerone.com/reports/1656627
generic_textual MODERATE https://hackerone.com/reports/1656627
cvssv3.1 6.1 https://lists.debian.org/debian-lts-announce/2023/09/msg00012.html
generic_textual MODERATE https://lists.debian.org/debian-lts-announce/2023/09/msg00012.html
cvssv3.1 6.1 https://nvd.nist.gov/vuln/detail/CVE-2022-23519
generic_textual MODERATE https://nvd.nist.gov/vuln/detail/CVE-2022-23519
No exploits are available.
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N Found at https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2022-23519.json
Attack Vector (AV) Attack Complexity (AC) Privileges Required (PR) User Interaction (UI) Scope (S) Confidentiality Impact (C) Integrity Impact (I) Availability Impact (A)

network

adjacent_network

local

physical

low

high

none

low

high

none

required

unchanged

changed

high

low

none

high

low

none

high

low

none

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N Found at https://ftp.suse.com/pub/projects/security/yaml/suse-cvss-scores.yaml
Attack Vector (AV) Attack Complexity (AC) Privileges Required (PR) User Interaction (UI) Scope (S) Confidentiality Impact (C) Integrity Impact (I) Availability Impact (A)

network

adjacent_network

local

physical

low

high

none

low

high

none

required

unchanged

changed

high

low

none

high

low

none

high

low

none

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N Found at https://github.com/rails/rails-html-sanitizer
Attack Vector (AV) Attack Complexity (AC) Privileges Required (PR) User Interaction (UI) Scope (S) Confidentiality Impact (C) Integrity Impact (I) Availability Impact (A)

network

adjacent_network

local

physical

low

high

none

low

high

none

required

unchanged

changed

high

low

none

high

low

none

high

low

none

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N Found at https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-9h9g-93gc-623h
Attack Vector (AV) Attack Complexity (AC) Privileges Required (PR) User Interaction (UI) Scope (S) Confidentiality Impact (C) Integrity Impact (I) Availability Impact (A)

network

adjacent_network

local

physical

low

high

none

low

high

none

required

unchanged

changed

high

low

none

high

low

none

high

low

none

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N Found at https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rails-html-sanitizer/CVE-2022-23519.yml
Attack Vector (AV) Attack Complexity (AC) Privileges Required (PR) User Interaction (UI) Scope (S) Confidentiality Impact (C) Integrity Impact (I) Availability Impact (A)

network

adjacent_network

local

physical

low

high

none

low

high

none

required

unchanged

changed

high

low

none

high

low

none

high

low

none

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N Found at https://hackerone.com/reports/1656627
Attack Vector (AV) Attack Complexity (AC) Privileges Required (PR) User Interaction (UI) Scope (S) Confidentiality Impact (C) Integrity Impact (I) Availability Impact (A)

network

adjacent_network

local

physical

low

high

none

low

high

none

required

unchanged

changed

high

low

none

high

low

none

high

low

none

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N Found at https://lists.debian.org/debian-lts-announce/2023/09/msg00012.html
Attack Vector (AV) Attack Complexity (AC) Privileges Required (PR) User Interaction (UI) Scope (S) Confidentiality Impact (C) Integrity Impact (I) Availability Impact (A)

network

adjacent_network

local

physical

low

high

none

low

high

none

required

unchanged

changed

high

low

none

high

low

none

high

low

none

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N Found at https://nvd.nist.gov/vuln/detail/CVE-2022-23519
Attack Vector (AV) Attack Complexity (AC) Privileges Required (PR) User Interaction (UI) Scope (S) Confidentiality Impact (C) Integrity Impact (I) Availability Impact (A)

network

adjacent_network

local

physical

low

high

none

low

high

none

required

unchanged

changed

high

low

none

high

low

none

high

low

none

Exploit Prediction Scoring System (EPSS)
Percentile 0.28552
EPSS Score 0.001
Published At Aug. 1, 2025, 12:55 p.m.
Date Actor Action Source VulnerableCode Version
2025-07-31T08:04:52.930090+00:00 Ruby Importer Import https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rails-html-sanitizer/CVE-2022-23519.yml 37.0.0