What’s Vulnerable › Vulnerabilities
CVE-2022-23517: Inefficient Regular Expression Complexity in rails-html-sanitizer
- Severity: high (CVSS 7.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 1.6% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2022-12-14 · updated 2026-06-17
- Weakness: CWE-1333
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.
Affected products
- Debian Linux: 10.0
- rails-html-sanitizer: before 1.4.4 — fixed in 1.4.4
- Rubygems Rails-Html-Sanitizer: before 1.4.4; 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.1.0 (+6) — fixed in 1.4.4
How to fix
Upgrade to a fixed version: rails-html-sanitizer 1.4.4; Rubygems Rails-Html-Sanitizer 1.4.4. Check the vendor advisory for mitigations.
References
- https://github.com/rails/rails-html-sanitizer/commit/56c61c0cebd1e493e8ad7bca2a0191609a4a6979
- https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-5x79-w82f-gw8w
- https://hackerone.com/reports/1684163
- https://lists.debian.org/debian-lts-announce/2023/09/msg00012.html
- https://github.com/rails/rails-html-sanitizer/commit/56c61c0cebd1e493e8ad7bca2a0191609a4a6979
- https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-5x79-w82f-gw8w
- https://hackerone.com/reports/1684163
- https://lists.debian.org/debian-lts-announce/2023/09/msg00012.html
- https://lists.debian.org/debian-lts-announce/2024/09/msg00045.html
Get alerted when CVE-2022-23517 or the next vulnerability affects your stack