CVE-2022-23517
rubygem-rails-html-sanitizer: Inefficient Regular Expression leading to denial of service
Overview
Description
rails-html-sanitizer is responsible for sanitizing HTML fragments in Rails applications. Certain configurations of rails-html-sanitizer < 1.4.4 use an inefficient regular expression that is susceptible to excessive backtracking when attempting to sanitize certain SVG attributes. This may lead to a denial of service through CPU resource consumption. This issue has been patched in version 1.4.4.
Source: OX vulnerability database
Severity
7.5 · HIGH
CVSS 3.1 base score, scored by NVD.
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- None
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness: CWE-1333
Affected packages · 1
| Ecosystem | Package | Vulnerable | Fixed in |
|---|---|---|---|
| RubyGems | rails-html-sanitizer | <1.4.4 | 1.4.4 |
Open a package to see all its vulnerabilities.
Operating systems · 15 fixes
Red Hat 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 7 | tfm-rubygem-rails-html-sanitizer | affected |
SUSE Linux Enterprise 2 releases · 1 package
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 15.4 | ruby2-5-rubygem-rails-html-sanitizer | 1.0.4-150000.4.6.1 | SUSE-SU-2023:3714-1 |
| 15.5 | ruby2-5-rubygem-rails-html-sanitizer | 1.0.4-150000.4.6.1 | SUSE-SU-2023:3714-1 |
debian 5 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 10 | ruby-rails-html-sanitizer | 1.0.4-1+deb10u2 |
| 11 | ruby-rails-html-sanitizer | 1.3.0-1+deb11u1 |
| 12 | ruby-rails-html-sanitizer | 1.4.4-1 |
| 13 | ruby-rails-html-sanitizer | 1.4.4-1 |
| 14 | ruby-rails-html-sanitizer | 1.4.4-1 |
echo 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| ruby-rails-html-sanitizer | 1.4.4-1 |
openSUSE 1 release · 4 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Tumbleweed | ruby3-1-rubygem-rails-html-sanitizer +1 | 1.5.0-1.1 | openSUSE-SU-2024:12769-1 |
| Tumbleweed | ruby3-3-rubygem-rails-html-sanitizer | 1.6.0-1.5 | openSUSE-SU-2024:14175-1 |
| Tumbleweed | ruby3-4-rubygem-rails-html-sanitizer | 1.6.0-1.7 | openSUSE-SU-2025:15125-1 |
| Tumbleweed | ruby4-0-rubygem-rails-html-sanitizer | 1.6.0-1.9 | openSUSE-SU-2026:10361-1 |
seal Red Hat 2 releases · 2 packages
| Release | Package | Fixed in |
|---|---|---|
| 7 | python-jinja2 +1 | 2.7.2-4.el7+sp999 |
| 8 | libsolv +1 | 0.7.20-6.el8+sp999 |
References
- access.redhat.com https://access.redhat.com/security/cve/CVE-2022-23517
- cwe.mitre.org https://cwe.mitre.org/data/definitions/1333.html
- github.com https://github.com/rails/rails-html-sanitizer
- github.com https://github.com/rails/rails-html-sanitizer/commit/56c61c0cebd1e493e8ad7bca2a0191609a4a6979
- github.com https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-5x79-w82f-gw8w
- github.com https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rails-html-sanitizer/CVE-2022-23517.yml
- hackerone.com https://hackerone.com/reports/1684163
- lists.debian.org https://lists.debian.org/debian-lts-announce/2023/09/msg00012.html
- lists.debian.org https://lists.debian.org/debian-lts-announce/2024/09/msg00045.html
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2022-23517
Show all 11 references
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.