Skip to main content

rails-html-sanitizer CVE-2026-128068

| EUVDEUVD-2026-125592 MEDIUM
Uncontrolled Resource Consumption (CWE-400)
2026-11-13 GitHub_M GHSA-cpgf-5mjf-73p7
5.3
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Submit HTML with SVG use element
  2. Exploit
    Set href to long whitespace run
  3. Execution
    Trigger quadratic regex rescan in PermitScrubber
  4. Impact
    Exhaust worker CPU (partial DoS)

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource consumption limits
MITRE ATT&CK

1 technique across 1 tactic: Impact

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires a non-default configuration: the application must override allowed tags to include an SVG reference element such as 'use' AND allow href or xlink:href in the permitted attributes (via Rails::HTML::PermitScrubber / safe_list_sanitize). It additionally requires the host to run CRuby 3.1 or earlier, or JRuby - CRuby 3.2 and later uses linear-time regex matching and is NOT affected. The default allowed-tag set includes no SVG elements and is not vulnerable. Given those preconditions the attacker needs no authentication and no user interaction, supplying a 'use' element whose href/xlink:href is a long whitespace run. Applications using Loofah directly are exposed through its own copy of the check (fixed in Loofah 2.25.3). Limiting factors: non-default config, specific Ruby runtime, and impact bounded to CPU exhaustion of the processing worker.

Impact

This is a genuine but low-urgency issue, best characterized as a high-severity-class name (ReDoS/CWE-400/CWE-1333) with modest real-world risk. The CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L, 5.3 Medium) correctly reflects a network-reachable, unauthenticated trigger with only partial availability impact and no confidentiality or integrity impact - consistent with quadratic CPU consumption rather than code execution. Not in CISA KEV (no confirmed active exploitation) and no EPSS score was provided, so widespread exploitation cannot be inferred from quantitative signals. The decisive mitigating factor is exposure: per the vendor advisory the default allowed-tag configuration is NOT affected - an application is only vulnerable if it overrides allowed tags to include an SVG reference element such as 'use' together with href/xlink:href, AND runs CRuby 3.1 or earlier or JRuby (CRuby 3.2+ matches the pattern in linear time and is unaffected). These compounding preconditions sharply narrow the real-world population, which aligns with the vendor's 'this_month' priority rather than an emergency. Net: patch on a normal maintenance cadence; it is a worker-CPU denial-of-service, not a critical breach vector.

Exploit ScenarioDerived

A Rails application has customized rails-html-sanitizer to permit SVG 'use' elements with href/xlink:href and runs on CRuby 3.1 or JRuby. An unauthenticated attacker submits user-generated HTML containing a 'use' element whose href is a long run of whitespace; the local-reference check rescans that whitespace from every line start, consuming CPU quadratic in input length and tying up the request worker. The GHSA advisory and commit test cases publicly describe the exact triggering input, so a public PoC reference exists; it is not verified as working exploit code.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.5% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 13, 2026

Quadratic CPU consumption in rails-html-sanitizer 1.0.3 through 1.7.1 lets remote, unauthenticated attackers make a sanitizing application burn disproportionate CPU by submitting an SVG reference element such as <use> whose href or xlink:href is a long all-whitespace run. Only applications that override the default allowed tags to include an SVG reference element and permit href/xlink:href are exposed, and the host must run CRuby 3.1 or earlier (or JRuby) - CRuby 3.2 and later use linear-time regexp matching and are not affected; the default configuration ships no SVG elements and is safe. Impact is bounded to availability (CVSS 3.1 base 5.3, A:L), and no public exploit code was identified at time of analysis, with the vendor-reported issue credited to scyoon via the Rails HackerOne program.

RemediationAI

Vendor-released patch: upgrade rails-html-sanitizer to 1.7.2 (release https://github.com/rails/rails-html-sanitizer/releases/tag/v1.7.2, commit f776f963b9d9346271aade9cb903e793fd38e865), which also raises the minimum Loofah dependency to ~> 2.25, >= 2.25.3; applications that use Loofah directly must upgrade Loofah to 2.25.3 at minimum to receive the corresponding fix in its own copy of the check. If upgrading is not immediately possible, the vendor documents two workarounds: run CRuby 3.2 or later, where the pattern is matched in linear time (trade-off is a Ruby runtime change that is often not feasible for existing deployments, and JRuby installations gain nothing from it), or remove the SVG reference elements from the overridden allowed tags so that use and similar elements are no longer permitted (trade-off is that legitimate SVG reference content will be stripped by the sanitizer). Review whether the application overrides allowed tags at all - installations using the default allowed-tag set are not affected and need no change beyond routine dependency hygiene; advisory details are at https://github.com/rails/rails-html-sanitizer/security/advisories/GHSA-cpgf-5mjf-73p7

Affected VersionsENISA

rails-html-sanitizer 1.0.3, < 1.7.2

Affected Packages

rubygems rails-html-sanitizer fix: 1.7.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in rubygems

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Rails::HTML::PermitScrubber is the allow-list scrubber used by safe_list_sanitize in the rails-html-sanitizer gem. To keep SVG reference elements local, it validated href and xlink:href values against the regular expression /^\s*[^#\s].*/m. In Ruby's Onigmo regexp engine, ^ anchors at every line start and \s matches newlines, so a value consisting only of whitespace forces the engine to rescan the same whitespace run from each successive line start, producing time quadratic in the value length (CWE-400 resource exhaustion, also tracked as CWE-1333 inefficient regular expression complexity). CRuby 3.2 introduced memoized linear-time regexp matching, which makes this pattern linear; CRuby 3.1 and earlier, and JRuby (Joni engine), remain vulnerable. The trigger requires a non-default scrubber configuration: the allowed tags must be overridden to include an SVG reference element such as use together with href or xlink:href in the allowed attributes. Applications using Loofah directly carry their own copy of the same check and are affected in the same way. The upstream fix (commit f776f963b9d9346271aade9cb903e793fd38e865) removes the duplicated check and delegates attribute-value handling to Loofah::HTML5::Scrub.scrub_attribute_value, raising the minimum Loofah dependency to ~> 2.25, >= 2.25.3.

Know when Rails gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 5.3 MEDIUM
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
vuln.today AI 5.3 MEDIUM

Attacker-supplied HTML is processed unauthenticated with no interaction (AV:N/PR:N/UI:N); a simple whitespace payload triggers it (AC:L); only CPU/availability is partially impacted (A:L, C:N/I:N).

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low

Lifecycle Timeline

2
Patch available
Nov 13, 2026 - 18:04 EUVD
CVE Published
Nov 13, 2026 - 17:15 cve.org
MEDIUM 5.3

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.5%
Top 60% exploitable
Prevalence
High
core HTML sanitizer gem used broadly across Rails applications
Threat Intel
1
1 sources
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA MSRC GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.5%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact· derived
High
Technical Impact
Partial

Priority Score

26
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

More in Rails

View all
CVE-2016-0752 HIGH POC
7.5 Feb 16

Directory traversal vulnerability in Action View in Ruby on Rails before 3.2.22.1, 4.0.x and 4.1.x before 4.1.14.1, 4.2.

CVE-2013-0333 HIGH POC
7.5 Jan 30

lib/active_support/json/backends/yaml.rb in Ruby on Rails 2.3.x before 2.3.16 and 3.0.x before 3.0.20 does not properly

CVE-2013-0156 HIGH POC
7.5 Jan 13

active_support/core_ext/hash/conversions.rb in Ruby on Rails before 2.3.15, 3.0.x before 3.0.19, 3.1.x before 3.1.10, an

CVE-2016-2098 HIGH POC
7.3 Apr 07

Action Pack in Ruby on Rails before 3.2.22.2, 4.x before 4.1.14.2, and 4.2.x before 4.2.5.2 allows remote attackers to e

CVE-2014-0130 HIGH
7.5 May 07

Directory traversal vulnerability in actionpack/lib/abstract_controller/base.rb in the implicit-render implementation in

CVE-2013-6414 MEDIUM POC
5.0 Dec 07

actionpack/lib/action_view/lookup_context.rb in Action View in Ruby on Rails 3.x before 3.2.16 and 4.x before 4.0.2 allo

CVE-2019-5420 CRITICAL POC
9.8 Mar 27

A remote code execution vulnerability in development mode Rails <5.2.2.1, <6.0.0.beta3 can allow an attacker to guess th

CVE-2020-8165 CRITICAL POC
9.8 Jun 19

A deserialization of untrusted data vulnernerability exists in rails < 5.2.4.3, rails < 6.0.3.1 that can allow an attack

CVE-2020-8163 HIGH POC
8.8 Jul 02

The is a code injection vulnerability in versions of Rails prior to 5.0.1 that wouldallow an attacker who controlled the

CVE-2017-17917 HIGH POC
8.1 Dec 29

SQL injection vulnerability in the 'where' method in Ruby on Rails 5.1.4 and earlier allows remote attackers to execute

CVE-2017-17916 HIGH POC
8.1 Dec 29

SQL injection vulnerability in the 'find_by' method in Ruby on Rails 5.1.4 and earlier allows remote attackers to execut

CVE-2012-6496 HIGH POC
7.5 Jan 04

SQL injection vulnerability in the Active Record component in Ruby on Rails before 3.0.18, 3.1.x before 3.1.9, and 3.2.x

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy