cve.bz

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

5.3 mediumFix available

Medium (5.3) in rails rails-html-sanitizer. Fixed in rails-html-sanitizer 1.7.2.

On this page
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.

Severity

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
CWEs
CWE-400 Uncontrolled Resource Consumption
CWE-1333 Inefficient Regular Expression Complexity
Published
Assigned by
GitHub_M (CNA)
NVD analysis
Awaiting analysis
Record from
the NVD, synced

Ask an AI about this CVE

Show the promptExplain CVE-2026-128068 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-128068?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-128068?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-128068 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Badge for a README or a site

CVE-2026-128068

An image that stays current: it is drawn from the data each time it is fetched (a host that proxies images, as GitHub does, may show its copy for a while). Markdown:

[![CVE-2026-128068](https://cve.bz/cve/badge/CVE-2026-128068.svg)](https://cve.bz/cve/CVE-2026-128068)

HTML:

<a href="https://cve.bz/cve/CVE-2026-128068"><img src="https://cve.bz/cve/badge/CVE-2026-128068.svg" alt="CVE-2026-128068"></a>

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
rails-html-sanitizer>= 1.0.3, < 1.7.2

Fix and patched versions

  • rails-html-sanitizer (RubyGems): fixed in 1.7.2

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-cpgf-5mjf-73p7RubyGemsrails-html-sanitizer>=1.0.3 <1.7.21.7.2

Attack patterns (CAPEC)

  • CAPEC-492 Regular Expression Exponential Blowup
  • CAPEC-147 XML Ping of the Death Likelihood: Low · Severity: Medium
  • CAPEC-227 Sustained Client Engagement

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON