MEDIUM · CVSS 3.0 6.1 EPSS 0.3% · 20th percentile CWE-79

CVE-2026-126070: Action View: Possible XSS vulnerability in strip_tags

Published 2026-11-12 · Updated 2026-11-12 · Also known as GHSA-rq8q-p985-fjq7

Summary

Action View's strip_tags function improperly leaves quotation marks unencoded while marking output as html_safe, potentially enabling Cross-Site Scripting (XSS). Engineering teams using vulnerable versions of Action View should upgrade immediately.

Who is affected

Applications that render strip_tags output from untrusted input inside a quoted HTML attribute value (such as a title attribute or meta content tag) are affected. Because ERB does not escape strings marked html_safe, an attacker could close the attribute and inject new attributes or code. Output rendered as element content is not affected.

Exploitability

The vulnerability can be exploited over the network with low attack complexity, requiring user interaction to execute. The CVSS score is 6.1 (Medium), and the current EPSS score is 0.003 with CISA KEV status set to no.

Remediation

How to check your project

Automated analysis of the published advisory data, generated 2026-11-18. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
RubyGems actionview >= 8.1.0.beta1, < 8.1.4.1 8.1.4.1 bundle update actionview
RubyGems actionview >= 0, < 8.0.5.2 8.0.5.2 bundle update actionview

CVSS 3.0 vector

CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Attack vectorNetwork
Attack complexityLow
Privileges requiredNone
User interactionRequired
ScopeChanged
ConfidentialityLow
IntegrityLow
AvailabilityNone

FAQ

What causes the vulnerability in strip_tags?

strip_tags returns output marked as html_safe, but the underlying sanitizer previously encoded only &, <, and >, leaving quotes (" and ') unencoded.

Is element content rendering affected?

No, output rendered as element content is not affected by this vulnerability.

Are there patches available for older series?

Patches are available for version 8.1 and 8.0 via official commits referenced in the advisory.

Original advisory description
### Impact `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. ### Details `strip_tags` now encodes `"` and `'` in its output, as well as `&`, `<` and `>`, without double-encoding existing entities. Applications that use `strip_tags` output outside HTML, such as in a text template or JSON, now see `&quot;` and `&#39;` where they saw `"` and `'`; `CGI.unescapeHTML` decodes them. See the Action View CHANGELOG. ### Workarounds Pass `strip_tags` output to an attribute through a tag helper, which escapes attribute values, for example `tag.a(title: strip_tags(user_input))`. ### Releases The fixed releases are available at the normal locations. Patches for those who cannot upgrade at once: - 8.1: https://github.com/rails/rails/commit/568b19cb860322885593e308a7f27aceb779e9d7.patch - 8.0: https://github.com/rails/rails/commit/c3772a10f405f9644125cbb484adfd2aa7a25a59.patch ### Credit This issue was responsibly reported by HackerOne researcher [lucasluitjes](https://hackerone.com/lucasluitjes).

References

Source records: GHSA-rq8q-p985-fjq7 (OSV.dev) · EPSS by FIRST, 2026-11-21.