Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit HTML with SVG use element
-
ExploitSet href to long whitespace run
-
ExecutionTrigger quadratic regex rescan in PermitScrubber
-
ImpactExhaust 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
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).
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.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
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
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.
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
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
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
Directory traversal vulnerability in actionpack/lib/abstract_controller/base.rb in the implicit-render implementation in
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
A remote code execution vulnerability in development mode Rails <5.2.2.1, <6.0.0.beta3 can allow an attacker to guess th
A deserialization of untrusted data vulnernerability exists in rails < 5.2.4.3, rails < 6.0.3.1 that can allow an attack
The is a code injection vulnerability in versions of Rails prior to 5.0.1 that wouldallow an attacker who controlled the
SQL injection vulnerability in the 'where' method in Ruby on Rails 5.1.4 and earlier allows remote attackers to execute
SQL injection vulnerability in the 'find_by' method in Ruby on Rails 5.1.4 and earlier allows remote attackers to execut
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
EUVD-2026-125592
GHSA-cpgf-5mjf-73p7
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB