CVE-2026-128068
rails-html-sanitizer: Possible regular expression denial of service with certain configurations
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.
Fixes and workarounds
Fix
rails-html-sanitizer (RubyGems): OSV reports a fixed version 1.7.2. Check the advisory for supported release branches.
Source: OSV GHSA-cpgf-5mjf-73p7Affected products and versions
| Product | Versions | Authority |
|---|---|---|
| rails-html-sanitizer rails |
>= 1.0.3, < 1.7.2 (affected) | CNA: GitHub_M |
rails-html-sanitizerrails-html-sanitizer
RubyGems |
1.0.3 (affected, RubyGems) 1.0.4 (affected, RubyGems) 1.1.0 (affected, RubyGems) 1.2.0 (affected, RubyGems) 1.3.0 (affected, RubyGems) 1.4.0 (affected, RubyGems) 1.4.1 (affected, RubyGems) 1.4.2 (affected, RubyGems) 1.4.3 (affected, RubyGems) 1.4.4 (affected, RubyGems) 1.5.0 (affected, RubyGems) 1.6.0 (affected, RubyGems) 1.6.0.rc1 (affected, RubyGems) 1.6.0.rc2 (affected, RubyGems) 1.6.1 (affected, RubyGems) 1.6.2 (affected, RubyGems) 1.7.0 (affected, RubyGems) 1.7.1 (affected, RubyGems) Ecosystem version events: introduced 1.0.3; fixed 1.7.2 Source events (ECOSYSTEM)
Other versions: unaffected |
OSV GHSA-cpgf-5mjf-73p7 |
Version ranges are source assertions. Check the vendor advisory and your installed configuration before determining exposure.
CVSS assessments
| Version / score | Vector | Authority |
|---|---|---|
| 3.1 / 5.3 medium |
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L | CNA: GitHub_M |
Exploit evidence
No exploit evidence in collected sources. This is not proof of no exploitation.
References
- https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-cpgf-5mjf-73p7CNA: GitHub_M · x_refsource_CONFIRM
- https://github.com/rails/rails-html-sanitizer/commit/f776f963b9d9346271aade9cb903e793fd38e865CNA: GitHub_M · x_refsource_MISC
- https://github.com/rails/rails-html-sanitizer/releases/tag/v1.7.2CNA: GitHub_M · x_refsource_MISC
- https://github.com/advisories/GHSA-cpgf-5mjf-73p7OSV / GitHub Security Advisories · advisory
- https://osv.dev/vulnerability/GHSA-cpgf-5mjf-73p7OSV / GitHub Security Advisories · osv
For agents and automation
Read public disclosures for free as Markdown or JSON. Compatible browsers also expose native WebMCP tools to search disclosures, read this page, and discover API access.
Use the ontology-linked Cyber API with x402 pay per request, or a Y2 Pro or Elite API key with the intel:cyber scope.
Endpoints and access details
https://api.y2.dev/api/v2/cyber/cveshttps://api.y2.dev/api/v2/cyber/cves/{cveId}
A workspace owner or admin can create a Pro or Elite API key. Send Authorization: Bearer <Y2_API_KEY> from your trusted agent runtime.
For x402, omit Authorization and read the HTTP 402 payment challenge before signing a retry. Public browser tools do not make payments.