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

Status: published. Published: 2026-11-13. Updated: 2026-11-13.

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.

## Remediation

- 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-73p7) — https://github.com/advisories/GHSA-cpgf-5mjf-73p7

## Affected products and versions

- rails / rails-html-sanitizer: >= 1.0.3, < 1.7.2 (affected). Source: CNA: GitHub_M
-  / rails-html-sanitizer (rails-html-sanitizer): 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: OSV GHSA-cpgf-5mjf-73p7

## Severity and prioritization

- CVSS 3.1: 5.3 (medium); CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L; source: CNA: GitHub_M

- CISA KEV: No listing in collected sources

- EPSS: Not available

- SSVC: Not available

- Weaknesses: CWE-400, CWE-1333

## 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-73p7 (CNA: GitHub_M; x_refsource_CONFIRM)

- https://github.com/rails/rails-html-sanitizer/commit/f776f963b9d9346271aade9cb903e793fd38e865 (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/rails/rails-html-sanitizer/releases/tag/v1.7.2 (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/advisories/GHSA-cpgf-5mjf-73p7 (OSV / GitHub Security Advisories; advisory)

- https://osv.dev/vulnerability/GHSA-cpgf-5mjf-73p7 (OSV / GitHub Security Advisories; osv)

## Provenance

- CNA: GitHub_M: https://www.cve.org/CVERecord?id=CVE-2026-128068; retrieved 2026-11-13; source updated 2026-11-13

- OSV / GitHub Security Advisories: https://osv.dev/vulnerability/GHSA-cpgf-5mjf-73p7; retrieved 2026-11-13; source updated 2026-11-13

Revision: b6dd81ac1b92b3ae1e2280f7be2affab90c01063df42626ba36c719921ed0845

Canonical: https://y2.dev/cve/CVE-2026-128068

## Agent and API access

Public CVE pages, Markdown, and JSON are free to read without an account or API key.

- Public catalog: https://y2.dev/cve/index.json. Follow nextCursor with the same search, filters, sort, and limit (1–100). A null cursor marks the end.

- WebMCP: search_cve_disclosures, get_cve_disclosure, get_cve_page_markdown, get_y2_cve_access. Available in compatible browsers.

- Cyber API: https://api.y2.dev/api/v2/cyber/cves and https://api.y2.dev/api/v2/cyber/cves/{cveId}.

- Y2 Pro or Elite: create a workspace API key with the intel:cyber scope and send Authorization: Bearer <Y2_API_KEY>. Setup: https://y2.dev/docs/api/create-key.

- x402: Pay per request without an account or API key. Omit Authorization, read the HTTP 402 PAYMENT-REQUIRED challenge, validate its current requirements, and retry with PAYMENT-SIGNATURE through an authorized payment client. These browser tools never make payments. Guide: https://y2.dev/docs/api/x402.

- OpenAPI: https://y2.dev/api/openapi.yaml. Agent access metadata: https://y2.dev/cve/agent.json.

Collected public records only. Check source status for coverage and freshness.