IT SBIT Services
Schneeberger
DEEN
CVE tracker

Rails Action View: Cross-site scripting in strip_tags output within HTML attributes

CVE-2026-126070Medium 6.1

← All vulnerabilities

Summary

Action View's strip_tags helper returns its output marked as html_safe, but it only encodes &, < and >, leaving double and single quotes unencoded. If an application renders this output from untrusted input inside a quoted HTML attribute, such as a title attribute or a meta content tag, an attacker can break out of the attribute and inject new attributes, possibly leading to cross-site scripting. Output rendered as element content is not affected.

Affected

  • Rails versions below 8.0.5.2
  • Rails 8.1 versions below 8.1.4.1

Fixed in

  • Rails 8.0.5.2
  • Rails 8.1.4.1
  • Rails 7.2, 7.1 and 6.1 are not fixed upstream (unsupported)

Workaround

  • Do not place strip_tags output into HTML attributes; use a tag helper such as tag.a(title: strip_tags(user_input)), which escapes attribute values.
  • Output rendered as element content is not affected.

Exploitation

Unknown. No reports of in-the-wild exploitation or public proof of concept were found at the time of research.

Our recommendation

  • Upgrade to Rails 8.1.4.1, or to 8.0.5.2 if the application cannot move to 8.1 yet. Note that Rails 8.0 security support ends after this release.
  • Check whether untrusted input passes through strip_tags into attribute values, and apply the tag-helper workaround where patching is delayed.
  • Test for changed output, since quotes are now encoded as &quot; and &#39;.
  • Prioritise the critical Active Storage fix GHSA-f3w6-w445-fwh9 in the same release if uploads are processed with mini_magick.

Public exploits

PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.

Research sources

Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 11 Nov 2026, 14:15.

Original description (NVD)

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, strip_tags in Action View returns its sanitized output marked html_safe, but the underlying sanitizer encodes only &, < and >, leaving " and ' unencoded. Because ERB does not escape a string marked html_safe, untrusted input passed through strip_tags and rendered inside a quoted HTML attribute value could close the attribute and add new attributes, possibly leading to XSS. Applications that render strip_tags output from untrusted input inside an HTML attribute, for example in a title attribute or a <meta content> tag, are affected. Output rendered as element content is not affected. This issue is fixed in versions 8.1.4.1 and 8.0.5.2.

NVD references (5)

Sources

The tracker combines official, freely usable data sources – updated continuously:

This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.

Affected? We can help.

We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.