# CVE-2026-128068: rails-html-sanitizer: Possible regular expression denial of service with certain configurations

- Severity: Medium 5.3 (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:L`
- 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): 0.45%, higher than 41% of CVEs (2026-12-01)
- Published: 2026-11-13T17:15:56.816Z
- Modified: 2026-11-16T16:17:49.533Z
- Also known as: GHSA-cpgf-5mjf-73p7
- Weaknesses: CWE-400, 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. From 1.0.3 through 1.7.1, Rails::HTML::PermitScrubber checks SVG href and xlink:href local references with a pattern whose line-start anchor and whitespace class cause an all-whitespace value to be rescanned from each line start. An attacker who supplies HTML can cause quadratic CPU consumption when an application customizes its allowed tags to include an SVG reference element such as use and permits href or xlink:href. The default allowed tag configuration is not affected. CRuby 3.2 and later uses linear-time regular expression matching for this pattern, while CRuby 3.1 and earlier and JRuby are affected. This issue is fixed in version 1.7.2.

(As written by CVE List.)

## Affected

- rails rails-html-sanitizer: >= 1.0.3, < 1.7.2
- rails-html-sanitizer (RubyGems): from 1.0.3 before 1.7.2

## Every score

- GitHub_M: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
- GitHub: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`

## References

- <https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-cpgf-5mjf-73p7> (web)
- <https://github.com/rails/rails-html-sanitizer/commit/f776f963b9d9346271aade9cb903e793fd38e865> (web)
- <https://github.com/rails/rails-html-sanitizer/releases/tag/v1.7.2> (web)
- <https://github.com/rails/rails-html-sanitizer> (package)
- <https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rails-html-sanitizer/GHSA-cpgf-5mjf-73p7.yml> (web)

## Sources

- CVE List: [CVE-2026-128068](https://www.cve.org/CVERecord?id=CVE-2026-128068), CVE Terms of Use, modified 2026-11-16
- GitHub Advisory Database: [GHSA-cpgf-5mjf-73p7](https://github.com/advisories/GHSA-cpgf-5mjf-73p7), CC-BY-4.0, modified 2026-11-13
- NVD: [CVE-2026-128068](https://nvd.nist.gov/vuln/detail/CVE-2026-128068), Public domain, modified 2026-11-16

---

Page: https://cve.day/CVE-2026-128068 · Whole record: https://cve.day/CVE-2026-128068.json · Rebuilt by cve.day 2026-11-25T22:59:50.757Z
