CVE-2026-128068
Medium 5.3No known exploitationFix availablerails-html-sanitizer: Possible regular expression denial of service with certain configurations
Vendor advisory: GHSA-cpgf-5mjf-73p7
Record last updated
CVSS score
Medium on a 0 to 10 scale
EPSS, chance of exploitation in 30 days
Higher than 40% of scored CVEs. A prediction, not evidence.
CISA remediation deadline
Not in the KEV catalog
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.
Weakness: CWE-400, CWE-1333
Patching and mitigation
- Patch status
- Fix available (source: Microsoft MSRC)
- Fix documented (source date)
- Mitigation
- None documented
- Vendor guidance
- msrc.microsoft.com (opens in a new tab)
Affected products
| Vendor | Product | Affected versions | Fixed in | Per |
|---|---|---|---|---|
| Microsoft | azl4 rubygem-rails-html-sanitizer 1.6.0-8.azl4 on Azure Linux 4.0 | Not documented | Not documented | Microsoft MSRC |
| rubygems | rails-html-sanitizer | from 1.0.3 before 1.7.2 | 1.7.2 | GitHub Advisory Database |
Timeline
Advisory
Microsoft advisory published
Advisory change
Microsoft advisory revised (2.0): Information published.
Patch
Fix documented by Microsoft MSRC
Vendor guidance and references
- Microsoft Security Update Guide (opens in a new tab)vendor-advisory
- GitHub Advisory GHSA-cpgf-5mjf-73p7 (opens in a new tab)github-advisory
- https://github.com/rails/rails-html-sanitizer/commit/f776f963b9d9346271aade9cb903e793fd38e865 (opens in a new tab)
- https://github.com/rails/rails-html-sanitizer/releases/tag/v1.7.2 (opens in a new tab)
- https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-cpgf-5mjf-73p7 (opens in a new tab)