Loading advisory.
Loading advisory.
view_component Cross-site Scripting vulnerability
_What kind of vulnerability is it? Who is impacted?_
Published 2024-01-04 20:09 UTC · Modified 2026-09-10 03:49 UTC
Severity and EPSS are shown separately. Helm does not combine them into one score. How tiers work
| Package | Ecosystem | Affected | Fixed in | Upgrade command |
|---|---|---|---|---|
| view_component | RubyGems | >= 3.0.0, < 3.9.0 < 2.83.0 versions 3.0.0, 3.1.0, 3.2.0, 3.3.0, 3.4.0, 3.5.0, 3.6.0, 3.7.0, 3.8.0, 1.16.0, 1.17.0, 2.0.0, 2.1.0, 2.10.0, 2.11.0, 2.11.1, 2.12.0, 2.13.0, 2.14.0, 2.14.1 and 98 more | 3.9.0, 2.83.0 | gem install view_component -v 3.9.0gem install view_component -v 2.83.0 |
What kind of vulnerability is it? Who is impacted?
This is an XSS vulnerability that has the potential to impact anyone rendering a component directly from a controller with the view_component gem. Note that only components that define a #call method (i.e. instead of using a sidecar template) are affected. The return value of the #call method is not sanitized and can include user-defined content.
In addition, the return value of the #output_postamble method is not sanitized, which can also lead to XSS issues.
Has the problem been patched? What versions should users upgrade to?
Versions 3.9.0 has been released and fully mitigates both the #call and the #output_postamble vulnerabilities.
Is there a way for users to fix or remediate the vulnerability without upgrading?
Sanitize the return value of #call, eg:
class MyComponent < ApplicationComponent
def call
html_escape("<div>#{user_input}</div>")
end
endAre there any links users can visit to find out more?
https://github.com/ViewComponent/view_component/pull/1950
If you have any questions or comments about this advisory:
Open an issue in the github/view_component project.
No public exploit code known to Helm's sources (Nuclei templates, Metasploit, Exploit-DB and PoC-in-GitHub). That does not mean none exists.
EPSS went from 0.005 on 2026-11-24 to 0.007 on 2026-11-26, over 2 recorded scores.
| Date | Score | Previous | Model |
|---|---|---|---|
| 2026-11-24 | 0.005 | first score | v2026.06.15 |
| 2026-11-26 | 0.007 | 0.005 | v2026.06.15 |