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

- Severity: High 7.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.59%, higher than 76% of CVEs (2026-12-01)
- Published: 2022-12-13T17:43:02.000Z
- Modified: 2026-06-17T04:30:16.950Z
- Also known as: GHSA-5x79-w82f-gw8w
- Weaknesses: CWE-1333
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: GitHub_M

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

(As written by CVE List.)

## Affected

- rails rails-html-sanitizer: < 1.4.4
- rails-html-sanitizer (RubyGems): before 1.4.4
- rubyonrails rails_html_sanitizers: before 1.4.4
- debian debian_linux: 10.0

## Every score

- GitHub_M: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-5x79-w82f-gw8w> (third-party-advisory, web)
- <https://github.com/rails/rails-html-sanitizer/commit/56c61c0cebd1e493e8ad7bca2a0191609a4a6979> (patch, third-party-advisory, web)
- <https://hackerone.com/reports/1684163> (permissions-required, third-party-advisory, web)
- <https://lists.debian.org/debian-lts-announce/2023/09/msg00012.html> (mailing-list, third-party-advisory, web)
- <https://lists.debian.org/debian-lts-announce/2024/09/msg00045.html> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-23517> (advisory)
- <https://github.com/rails/rails-html-sanitizer> (package)
- <https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rails-html-sanitizer/CVE-2022-23517.yml> (web)

## Sources

- CVE List: [CVE-2022-23517](https://www.cve.org/CVERecord?id=CVE-2022-23517), CVE Terms of Use, modified 2025-11-03
- GitHub Advisory Database: [GHSA-5x79-w82f-gw8w](https://github.com/advisories/GHSA-5x79-w82f-gw8w), CC-BY-4.0, modified 2025-11-04
- NVD: [CVE-2022-23517](https://nvd.nist.gov/vuln/detail/CVE-2022-23517), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-23517 · Whole record: https://cve.day/CVE-2022-23517.json · Rebuilt by cve.day 2026-11-25T22:58:17.528Z
