CVE-2026-128068
rails-html-sanitizer is responsible for sanitizing HTML fragments …
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.
What to do now
- Check your exposureFind out whether the affected software runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Limit access until thenIf you cannot update at once, take the system off the internet or restrict who can reach it.
References
- github.com/rails/rails-html-sanitizer/commit/f776f963b9d9346271aade9cb903e793fd38e865
- github.com/rails/rails-html-sanitizer/releases/tag/v1.7.2
- github.com/rails/rails-html-sanitizer/security/advisories/GHSA-cpgf-5mjf-73p7
- github.com/rubysec/ruby-advisory-db/blob/master/gems/rails-html-sanitizer/GHSA-cpgf-5mjf-7
- github.com/advisories/GHSA-cpgf-5mjf-73p7
- nvd.nist.gov/vuln/detail/CVE-2026-128068
- cve.org/CVERecord?id=CVE-2026-128068
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.