Read the docs
TI-2024-14361 Aliases CVE-2024-21636GHSA-wf2x-8w6j-qw37

view_component Cross-site Scripting vulnerability

Priority LOW 28CWE-79Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Required
Attack complexity
Low
Impact type
Cross-site scripting
Confidentiality · integrity · availability
Low · Low · None
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-79.

Summary

view_component is a framework for building reusable, testable, and encapsulated view components in Ruby on Rails. Versions prior to 3.9.0 and 2.83.0 have a cross-site scripting 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` methodis not sanitized, which can also lead to cross-site scripting issues. Versions 3.9.0 and 2.83.0 have been released and fully mitigate both the `#call` and the `#output_postamble` vulnerabilities. As a workaround, sanitize the return value of `#call`.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00495 42nd percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Fixed view_component (ViewComponent): 3.9.0, 2.83.0view_component (RubyGems): 3.9.0, 2.83.0

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
ViewComponentview_component3.0.0 to before 3.9.0; before 2.83.03.9.0, 2.83.0Patch availableCNA
—view_component (RubyGems)3.0.0 to before 3.9.03.9.0Patch availableGHSA-wf2x-8w6j-qw37
—view_component (RubyGems)before 2.83.02.83.0Patch availableGHSA-wf2x-8w6j-qw37
  • view_component VendorViewComponent Affected 3.0.0 to before 3.9.0; before 2.83.0 Fixed in 3.9.0, 2.83.0 Patch available CNA
  • view_component (RubyGems) Vendor— Affected 3.0.0 to before 3.9.0 Fixed in 3.9.0 Patch available GHSA-wf2x-8w6j-qw37
  • view_component (RubyGems) Vendor— Affected before 2.83.0 Fixed in 2.83.0 Patch available GHSA-wf2x-8w6j-qw37

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:viewcomponent:view_component:*:*:*:*:*:ruby:*:*before 2.83.0; 3.0.0 to before 3.9.0VulnerableViewComponent
  • cpe:2.3:a:viewcomponent:view_component:*:*:*:*:*:ruby:*:* Versions before 2.83.0; 3.0.0 to before 3.9.0 Vulnerable ·ViewComponent

Remediation

  • Fix · CNA view_component (ViewComponent) Fixed in 3.9.0, 2.83.0
  • Fix · GHSA-wf2x-8w6j-qw37 view_component (RubyGems) Fixed in 3.9.0 Advisory →
  • Fix · GHSA-wf2x-8w6j-qw37 view_component (RubyGems) Fixed in 2.83.0 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2024-21636
  2. 2026-10-03 Alias added: GHSA-wf2x-8w6j-qw37

References

  • TI-2026-39344 view_component: around_render HTML-Safety Bypass CVSS 3.1HIGH 8.7
  • TI-2026-32717 view_component: System Test Entry Point Path Check Allows Sibling Directory Escape CVSS 3.1HIGH 7.5
  • TI-2026-39343 view_component: Reused Component Instances Retain Stale Render Context CVSS 3.1MEDIUM 6.8

Sources