Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify multithreaded app with permissive sanitize path
-
DeliverySend concurrent requests to strict and permissive endpoints
-
ExploitRace interleaves shared PermitScrubber allowlist
-
ExecutionStrict response retains script or event-handler
-
ImpactStored XSS executes in victim browser
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | All three conditions must hold in the target application: (1) it runs more than one thread per process (e.g. Puma in multithreaded mode); (2) its code calls Rails::HTML::SafeListSanitizer (HTML4 or HTML5 variant) / the Action View sanitize helper with tags: or attributes: options that differ between call sites - including a call passing no options and thus using defaults - and at least one of those allowlists is permissive enough to admit a script element or an event-handler attribute; and (3) an attacker can trigger that permissive path concurrently with a stricter call whose output is stored or rendered to other users. Limiting factors that make a deployment NOT affected, per the advisory: single-threaded processes, using one identical allowlist everywhere, or passing a per-call scrubber: (Rails::HTML::PermitScrubber.new with tags= and attributes= set) instead of the tags:/attributes: options. Exploitation also requires that the strict output actually be rendered to a victim (UI:R), and reliable triggering requires winning the interleaving race (AC:H). |
| Impact | This is a genuine but moderate-priority XSS (CVE-2026-128069, CWE-79 compounded by CWE-362 race condition per the GHSA advisory). The vendor CVSS 3.1 vector CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N scores 4.7 (medium): network-reachable and unauthenticated (PR:N), but deliberately rated AC:H because reliable exploitation depends on winning a concurrency race between two in-flight sanitize calls, and UI:R because the tainted output must be rendered to a victim. Scope is Changed (S:C) since injected script executes in victim browsers rather than the app process. No CISA KEV entry is present in the input, so this is NOT confirmed actively exploited; the vuln.today decision label is 'this_month', not act_now/emergency. No EPSS score was supplied, so exploitation probability cannot be quantified from this data. The fix commit includes a regression test that deterministically reproduces the interleaving via an artificial reentrant hook - a public proof-of-concept of the mechanism, not verified as a working multithreaded exploit, and the input carries no explicit POC flag. The signals are internally consistent: medium CVSS, no KEV, no EPSS, month-level priority all point to a real-but-not-emergency issue whose practical risk is gated by application configuration (multithreading plus mixed allowlists). The main caveat is that impact is conditional on the host application's own sanitize usage, not on the library in isolation - a low-CVSS-looking issue that can become serious XSS in a narrow set of real deployments. |
| Exploit ScenarioDerived | A Rails app runs on a multithreaded server (e.g. Puma) and calls the memoized Action View sanitizer with different allowlists on different paths - one path permissive enough to admit a script element or event-handler attribute. An attacker repeatedly triggers the permissive path concurrently with a stricter sanitize call so the shared PermitScrubber's tags/attributes interleave, causing the strict call to emit attacker script unchanged; when that output is stored and rendered to other users it executes as XSS. A regression test in the fix commit demonstrates the interleaving deterministically, but no weaponized exploit is published and the AC:H rating reflects that reliable triggering requires winning the race. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 13, 2026
Cross-site scripting in the rails-html-sanitizer gem before 1.7.2 lets a concurrent request be sanitized with another call's more permissive allowlist, so a stricter call can emit script elements or event-handler attributes that the application expects to have been stripped. The flaw only manifests in multi-threaded Ruby processes (for example Puma with more than one thread) where sanitize is called with differing tags: or attributes: options, and where an attacker can trigger the permissive path while a stricter, rendered output is being produced; single-threaded apps, apps with one uniform allowlist, and apps passing their own scrubber: are not affected. Exploitation requires winning a race window and rendering the poisoned output to a victim (CVSS 3.1 AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N, 4.7), and no public exploit code was identified at time of analysis; the vendor-released fix is 1.7.2.
RemediationAI
Vendor-released patch: upgrade rails-html-sanitizer to 1.7.2 (release tag v1.7.2, fix commit 15f764c3563d5dd9b97ad32eaa7454577ccec4b9), which stops sharing a PermitScrubber across calls by constructing one per scrub; update the Gemfile/Gemfile.lock constraint accordingly, since the gem is a transitive dependency of Rails. If the upgrade cannot be scheduled on the normal monthly cadence, the advisory lists two workarounds: use one identical allowlist for every sanitize call (side effect: it removes the per-call flexibility the code currently relies on, and unifying toward a permissive list widens exposure while unifying toward a strict list may strip markup some views need), or pass a per-call scrubber: built with Rails::HTML::PermitScrubber.new and explicit tags=/attributes= instead of the tags:/attributes: options (side effect: an extra scrubber object is allocated per sanitize call, a small throughput cost, and every call site must be audited and converted or the race remains reachable). Multi-threaded deployments with mixed allowlists should treat the upgrade as the only complete fix, since neither workaround is enforced by the library.
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::SafeListSanitizer (both the HTML4 and HTML5 variants) wraps Loofah/Nokogiri fragment scrubbing with a Rails::HTML::PermitScrubber that carries the allowlist as mutable tags and attributes state. Before 1.7.2 the sanitizer instance allocated a single PermitScrubber in its initializer and, on every scrub call, assigned @permit_scrubber.tags and @permit_scrubber.attributes before invoking fragment.scrub!. Action View memoizes one SafeListSanitizer per helper module and reuses it for every sanitize call in the process, so that mutable scrubber is effectively process-wide shared state with no synchronization, which is the CWE-362 race condition underlying the CWE-79 injection outcome. When two threads interleave between the attribute assignment and the scrub, one call can be scrubbed under the other call's allowlist; if the permissive call admitted script or an event handler, the strict call's output retains active markup. The 1.7.2 commit (15f764c3563d5dd9b97ad32eaa7454577ccec4b9) removes the shared instance entirely: the initializer now stores only @prune and each scrub builds a fresh PermitScrubber with its own tags and attributes, and a regression test exercises a re-entrant sanitize call to confirm no cross-call configuration bleed. The HTMLElement/attribute parsing path itself is unchanged; the defect is purely the lifetime and sharing of the scrubber object, which is why per-call scrubber: usage was never vulnerable.
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:H/PR:N/UI:R/S:C/C:L/I:L/A:N
Unauthenticated network trigger (PR:N), but reliable exploitation requires winning a concurrency race (AC:H) and the tainted output must be rendered to a victim (UI:R); script crosses into the browser (S:C) with limited C/I and no availability impact.
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. Before 1.7.2, the HTML4 and HTML5 variants of Rails::HTML::SafeListSanitizer reuse one Rails::HTML::PermitScrubber across calls and mutate its tags and attributes without synchronization. In a multithreaded process, concurrent sanitize calls using different tags: or attributes: options can interleave and cause one call to use the other call's allowlist. If a permissive call admits a script element or event-handler attribute, output expected to be sanitized under a stricter policy can retain it and cause cross-site scripting when rendered. Applications that are single-threaded, use one identical allowlist everywhere, or provide a separate scrubber: are not 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
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
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-125593
GHSA-h7wh-q2qr-458c
NVD
CVE.org
EPSS
VulDB
Exploit-DB