Advisory Database
  • Advisories
  • Dependency Scanning
  1. gem
  2. ›
  3. rails-html-sanitizer
  4. ›
  5. CVE-2022-23517

CVE-2022-23517: Inefficient Regular Expression Complexity

December 14, 2022 (updated September 13, 2023)

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.

References

  • github.com/advisories/GHSA-5x79-w82f-gw8w
  • github.com/rails/rails-html-sanitizer/commit/56c61c0cebd1e493e8ad7bca2a0191609a4a6979
  • github.com/rails/rails-html-sanitizer/security/advisories/GHSA-5x79-w82f-gw8w
  • hackerone.com/reports/1684163
  • nvd.nist.gov/vuln/detail/CVE-2022-23517

Code Behaviors & Features

Detect and mitigate CVE-2022-23517 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.4.4

Fixed versions

  • 1.4.4

Solution

Upgrade to version 1.4.4 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-1333: Inefficient Regular Expression Complexity

Source file

gem/rails-html-sanitizer/CVE-2022-23517.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:24 +0000.