CVE-2026-126069 — rails
One of 9 rails vulnerabilities published together by NVD: our article covers all of them.
RubyWebBrowsersVulnerabilitiesAnalysis
Rails Action View tag helpers can emit malformed attributes from whitespace names (CVE-2026-126069)
A flaw in Rails Action View lets whitespace-only attribute names bypass an earlier blank-name check, producing malformed HTML that could possibly lead to XSS in applications that accept user-defined attribute names. Fixed in 8.1.4.1 and 8.0.5.2; exploitation status has not been published.
Key points
- Rails Action View versions before 8.1.4.1 and 8.0.5.2 are affected, per NVD.
- A whitespace-only Symbol name is not caught by the blank-name check, so it produces an attribute with no name.
- Applications that accept user-specified HTML attribute names are the main concern.
- NVD rates the issue MEDIUM (CVSS 4.7); it describes possible XSS.
- Exploitation status and proof of concept details have not been published in the sources.
What's affected
Action View, the Rails component that handles view template rendering and provides HTML view helpers, is affected. According to the NVD entry, versions before 8.1.4.1 and 8.0.5.2 are vulnerable. The sources list rails as the affected product.
The flaw is a gap in a previous fix, CVE-2026-33168, which was meant to skip blank HTML attribute names in tag helpers. That check tests the name before converting it to a string. A Symbol made up only of whitespace is not treated as blank by the check, so it reaches attribute escaping and produces an attribute with no name. The asset helpers image_tag, video_tag and audio_tag symbolize their options, so a whitespace String name passed to them follows the same path. Applications that let users specify custom HTML attribute names are the ones the NVD entry describes as affected.
How serious is it
NVD rates this MEDIUM, with a CVSS score of 4.7. The immediate result is malformed HTML. According to the description, a carefully crafted attribute value could then be interpreted by a browser as a separate attribute name, possibly leading to cross-site scripting. Real exposure depends on whether an application passes user-controlled attribute names into these helpers.
The sources do not include a detailed vector breakdown, and they do not say whether the flaw has been exploited in the wild. Treat those points as unpublished rather than assume either way.
What to do
Upgrade Rails to 8.1.4.1 or 8.0.5.2, matching your release line. These are the fixed versions named in the NVD entry. If you cannot patch right away, review code that lets users or external data choose HTML attribute names passed to tag helpers, and restrict those names to a fixed allowlist. To detect affected output, search rendered HTML in logs or test fixtures for attributes with empty or whitespace-only names, and review any templates that build attribute names dynamically.
Recommended actions
- Upgrade Rails to 8.1.4.1 or 8.0.5.2 depending on your release line.
- If patching is delayed, find code that takes user input as HTML attribute names and restrict it to an allowlist.
- Check rendered HTML and tests for attributes with blank or whitespace-only names.
- Review templates that build attribute names dynamically, including asset tag calls with String names from input.
Summary
Action View is a framework for handling view template lookup and rendering and provides view helpers for building HTML. Prior to 8.1.4.1 and 8.0.5.2, the fix for CVE-2026-33168 skips blank HTML attribute names in Action View tag helpers, but it tests the name before converting it to a string. A Symbol name made only of whitespace, such as :" ", is not blank, because Symbol#blank? is Symbol#empty?, so it reaches the attribute escaping, which emits an attribute with no name and produces malformed HTML. The asset tag helpers, such as image_tag, video_tag and audio_tag, symbolize their options, so a whitespace String name passed to them takes the same path. A carefully crafted attribute value could then be misinterpreted by the browser as a separate attribute name, possibly leading to XSS. Applications that allow users to specify custom HTML attribute names are affected. This issue is fixed in versions 8.1.4.1 and 8.0.5.2.
Severity breakdown
Medium · 4.7
An attacker without an account can exploit this over the network if a user is tricked into an action, but only under specific conditions.
- Attack from
- the network (remotely)
- Attack complexity
- high (only works under specific conditions)
- Login needed
- no
- User action needed
- yes, someone must click, open or visit something
- Scope
- reaches beyond the vulnerable component (e.g. from a sandbox or VM to the host)
- Impact
- low on confidentiality and integrity, none on availability
Weakness
- CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected and fixed versions
| Product | Affected versions | Fixed in |
|---|---|---|
| actionview (RubyGems) | ≥ 8.1.0.beta1, < 8.1.4.1 | 8.1.4.1 |
| < 8.0.5.2 | 8.0.5.2 | |
| rails | >= 8.1, < 8.1.4.1, < 8.0.5.2 | — |
References by type
Vendor advisories
Patches and fixed releases
- github.com/rails/rails/commit/9190210606ffe52f92fdc75637f8ff69404f22c8
- github.com/rails/rails/commit/f47452533e1f28d847c63181b9d5f8b7243ef9a4
- github.com/rails/rails/releases/tag/v8.0.5.2
- github.com/rails/rails/releases/tag/v8.1.4.1
Other references
Affected
- rails
What to do
- Follow the vendor advisory and the references below for fixed versions and workarounds.
Frequently asked questions
What is CVE-2026-126069?
A flaw in Rails Action View lets whitespace-only attribute names bypass an earlier blank-name check, producing malformed HTML that could possibly lead to XSS in applications that accept user-defined attribute names. Fixed in 8.1.4.1 and 8.0.5.2; exploitation status has not been published. Weakness type: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (CWE-79).
How severe is CVE-2026-126069?
CVE-2026-126069 has a CVSS 3.1 base score of 4.7 (medium), from the CNA (github.com). An attacker without an account can exploit this over the network if a user is tricked into an action, but only under specific conditions.
Is CVE-2026-126069 being exploited?
Not as far as is known: CVE-2026-126069 is not in CISA's Known Exploited Vulnerabilities catalog as of November 28, 2026. EPSS estimates a 0.3% chance that it is exploited in the next 30 days.
Which versions are affected by CVE-2026-126069?
actionview (RubyGems) ≥ 8.1.0.beta1, < 8.1.4.1 (fixed in 8.1.4.1); actionview (RubyGems) < 8.0.5.2 (fixed in 8.0.5.2); rails >= 8.1, < 8.1.4.1, < 8.0.5.2.
How do I fix CVE-2026-126069?
Upgrade Rails to 8.1.4.1 or 8.0.5.2 depending on your release line. If patching is delayed, find code that takes user input as HTML attribute names and restrict it to an allowlist. Check rendered HTML and tests for attributes with blank or whitespace-only names.
Timeline & sources
References
Related vulnerabilities & news
- Ruby Security Flaws Enable Remote Code Execution
- CVE-2026-130001: Mustache for Ruby RCE Vulnerability
- CVE-2026-122006: Active Storage Vulnerability in Ruby on Rails
- msgpack-ruby JRuby decoder: header-declared sizes drive uncapped allocation and memory exhaustion (CVE-2026-126366)
- CVE-2026-126186: Rails Active Storage flaw can expose files or allow code execution via media processing