CVE-2026-128068: rails-html-sanitizer · Possible regular expression denial of service with certain configurations
Affects rails-html-sanitizerSource GCVE Database
Not known to be exploited · CVSS 5.3 Medium : upgrade to 1.7.2 when convenient.
Data as of 13 Nov 2026, 18:48 UTC
Thin evidence
One scorer or none| CNA (GitHub_M) | CVSS 3.1 | 5.3 |
|---|
- Patch
- Available – fixed in 1.7.2
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:LExploitation evidence
Disclosed: evidence found.
CVE published 13 Nov 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 13 Nov 2026.
What to do
Upgrade rails-html-sanitizer to 1.7.2.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| RubyGemsrails-html-sanitizer | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Upgrade rails-html-sanitizer to version 1.7.2 or later, where the vulnerability is fixed. Alternatively, run the application on Ruby 3.2 or later, which uses a linear-time regexp engine that mitigates the issue. As a workaround, avoid overriding allowed tags to include SVG reference elements such as 'use' with href or xlink:href attributes. No other action is required if the default sanitizer configuration is used.
Description
A regular expression denial of service (ReDoS) vulnerability exists in rails-html-sanitizer versions 1.0.3 through before 1.7.2. The vulnerability arises from a regexp used to validate href attributes in SVG reference elements, which can cause quadratic-time processing on inputs with long whitespace runs. Only Ruby versions 3.1 and earlier are affected due to their regexp engine behavior. The default configuration is not affected unless SVG reference elements and their href attributes are explicitly allowed. The issue is fixed in version 1.7.2.
References
- github.com/rails/rails-html-sanitizer/security/advisories/GHSA-cpgf-5mjf-73p7 (opens in a new tab)
- github.com/rails/rails-html-sanitizer/commit/f776f963b9d9346271aade9cb903e793fd38e865 (opens in a new tab)
- github.com/rails/rails-html-sanitizer (opens in a new tab)
- github.com/rails/rails-html-sanitizer/releases/tag/v1.7.2 (opens in a new tab)
- github.com/rubysec/ruby-advisory-db/blob/master/gems/rails-html-sanitizer/GHSA-cpgf-5mjf-73p7.yml (opens in a new tab)