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

Medium 5.3 Published Updated
Exploited in the wild
Not known
Fix
Available

What is CVE-2026-128068?

CVE-2026-128068 is a medium-severity vulnerability in rails-html-sanitizer, published on 13 Nov 2026.

Official 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

Which versions are affected by CVE-2026-128068?

1 open source package ship an affected version, including rails-html-sanitizer.

PackageAffectedFixed in
rails-html-sanitizer RubyGems
pkg:gem/rails-html-sanitizer
From 1.0.31.7.2
Status by vendor (1)
WhoReleaseStatusPackages
Upstreamfixedrails-html-sanitizer (1.7.2)
pkg:gem/rails-html-sanitizer

How do I fix CVE-2026-128068?

Upgrade rails-html-sanitizer to 1.7.2 or later.

Is CVE-2026-128068 being exploited?

There is no known exploitation of CVE-2026-128068 in the wild and no public exploit code.

Sources

Also known as DEBIAN-CVE-2026-128068, DHI-6gkz-qdiz-hwwl-cslf, GHSA-cpgf-5mjf-73p7, UBUNTU-CVE-2026-128068.

Is CVE-2026-128068 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free