Rails-HTML-Sanitizer <=1.4.3 regex backtracking DOS
CVE-2022-23517 Published on December 14, 2022
Inefficient Regular Expression Complexity in rails-html-sanitizer
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.
Vulnerability Analysis
CVE-2022-23517 can be exploited with network access, and does not require authorization privileges or user interaction. This vulnerability is considered to have a low attack complexity. The potential impact of an exploit of this vulnerability is considered to have no impact on confidentiality and integrity, and a high impact on availability.
Weakness Type
What is a ReDoS Vulnerability?
The product uses a regular expression with an inefficient, possibly exponential worst-case computational complexity that consumes excessive CPU cycles. Some regular expression engines have a feature called "backtracking". If the token cannot match, the engine "backtracks" to a position that may result in a different token that can match. Backtracking becomes a weakness if all of these conditions are met:
CVE-2022-23517 has been classified to as a ReDoS vulnerability or weakness.
Products Associated with CVE-2022-23517
You can be notified by email with stack.watch whenever vulnerabilities like CVE-2022-23517 are published in these products:
Affected Versions
rails-html-sanitizer Version < 1.4.4 is affected by CVE-2022-23517Exploit Probability
EPSS (Exploit Prediction Scoring System) scores estimate the probability that a vulnerability will be exploited in the wild within the next 30 days. The percentile shows you how this score compares to all other vulnerabilities.