CVE-2026-126079

Action View: Possible XSS vulnerability in Action View text helpers

Published Nov 10, 2026 CVSS 3.1 · 6.1 Medium EPSS < 1% KEV · Not listed
Description
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, with the HTML5 sanitizer (Rails::HTML5::Sanitizer, the default vendor on CRuby for applications using load_defaults 7.1 or later), Nokogiri before 1.19.5 serializes < and > unescaped inside attribute values. The Action View text helpers highlight and simple_format sanitize their input and then process the resulting HTML as a string: highlight splits it on tag boundaries to insert matches, and simple_format splits it into paragraphs on blank lines. An unescaped > or a blank line inside an attribute value could cause markup in that value, which the sanitizer left inert, to be emitted as live elements in the helper's html_safe output, possibly leading to XSS. Applications that use the HTML5 sanitizer and pass untrusted text to highlight, or to simple_format with html_options, are affected. This issue is fixed in versions 8.1.4.1 and 8.0.5.2.

Analysis

AI-generated

Technical impact

A Cross‑Site Scripting flaw exists in the Action View text helpers highlight and simple_format. They sanitize their input but then treat the sanitized string as raw HTML. If an attacker can supply a value for a tag attribute that contains an unescaped ’>’ or a blank line, the sanitizer does not escape those characters but the helper still inserts the resulting string into the rendered page. The escaped characters are therefore rendered as live markup, allowing an attacker to inject executable script. This weakness can compromise confidentiality and integrity of client data by enabling arbitrary JavaScript to run in the context of a target user’s browser.

Affected Systems

The issue affects Ruby on Rails applications that use the default HTML5 sanitizer (Rails::HTML5::Sanitizer) in Rails versions earlier than 8.1.4.1 and 8.0.5.2. Applications built with Rails 8.0.x before 8.0.5.2 or Rails 8.1.x before 8.1.4.1, which call highlight or simple_format with untrusted text or html_options, are vulnerable.

Risk and Exploitability

The CVSS score of 6.1 indicates moderate severity. EPSS is below 1%, suggesting exploitation is unlikely to be common. The vulnerability is not listed in the CISA KEV catalog. Based on the description, it is inferred that an attacker would need to supply crafted input that is processed by highlight or simple_format in an application using the default HTML5 sanitizer. Once the input reaches these helpers, the flaw can be triggered without additional actions, making it relatively easy to exploit in affected deployments.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the Rails framework to version 8.0.5.2 or 8.1.4.1 or later, which removes the insecure handling of attribute values in the sanitizer.
  • If immediate upgrade is not possible, identify all sites that invoke highlight or simple_format on untrusted data and replace them with safer helpers or wrap the input in a custom sanitizer that escapes attribute delimiters.
  • Do not pass user‑supplied data directly into the html_options hash of simple_format; instead, sanitize the values before assignment or use a trusted attribute set.

Generated by OpenCVE AI on November 13, 2026 at 15:07 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-2p2f-4rq4-gjwc Action View: Possible XSS vulnerability in text helpers
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Rails
Rails rails
Vendors & Products Rails
Rails rails
Type Values Removed Values Added
Description 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, with the HTML5 sanitizer (Rails::HTML5::Sanitizer, the default vendor on CRuby for applications using load_defaults 7.1 or later), Nokogiri before 1.19.5 serializes < and > unescaped inside attribute values. The Action View text helpers highlight and simple_format sanitize their input and then process the resulting HTML as a string: highlight splits it on tag boundaries to insert matches, and simple_format splits it into paragraphs on blank lines. An unescaped > or a blank line inside an attribute value could cause markup in that value, which the sanitizer left inert, to be emitted as live elements in the helper's html_safe output, possibly leading to XSS. Applications that use the HTML5 sanitizer and pass untrusted text to highlight, or to simple_format with html_options, are affected. This issue is fixed in versions 8.1.4.1 and 8.0.5.2.
Title Action View: Possible XSS vulnerability in Action View text helpers
Weaknesses CWE-79
References
Metrics cvssV3_1

{'score': 6.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N'}

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Nov 13, 2026, 4:12 PM
Reserved
Nov 10, 2026, 5:07 PM
Status
Awaiting Analysis
Published
Nov 10, 2026, 9:19 PM
Modified
Nov 13, 2026, 5:17 PM