CVE Catalog

CVE-2026-128068

MediumCVSS 5.3
Published: Updated: Translated: NVD NIST

Exploitation Probability (EPSS)

Low risk
0.45%

41th percentile - higher than 41% of all known CVEs

Summary

rails-html-sanitizer versions 1.0.3 through 1.7.1 contain a resource exhaustion vulnerability where SVG href and xlink:href local references are checked with a pattern that causes quadratic CPU consumption on all-whitespace values. An attacker can supply crafted HTML if the application customizes 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, and the issue is fixed in version 1.7.2.

Risk Assessment

An attacker can cause excessive CPU consumption and degrade or deny availability of a Rails application that uses a custom configuration allowing SVG reference elements. Environments running CRuby 3.1 or earlier and JRuby are affected.

Recommendation

Upgrade rails-html-sanitizer to version 1.7.2 or later. If upgrading is not possible, consider removing SVG reference elements (e.g. use) and href/xlink:href attributes from the allowed tags list.

Other vulnerabilities in rails-html-sanitizer

See all
Original NVD description (English source)

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.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS