Read the docs
TI-2022-08537 Aliases CVE-2022-24722GHSA-cm9w-c4rj-r2cf

Cross-site Scripting in view_component

Priority LOW 39CWE-79Published · Updated

Key facts

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

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

Summary

VIewComponent is a framework for building view components in Ruby on Rails. Versions prior to 2.31.2 and 2.49.1 contain a cross-site scripting vulnerability that has the potential to impact anyone using translations with the view_component gem. Data received via user input and passed as an interpolation argument to the `translate` method is not properly sanitized before display. Versions 2.31.2 and 2.49.1 have been released and fully mitigate the vulnerability. As a workaround, avoid passing user input to the `translate` function, or sanitize the inputs before passing them.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.01092 65th percentileScored 2026-11-07
Fix Fixed view_component (github): 2.31.2, 2.49.1view_component (RubyGems): 2.31.2, 2.49.1

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Total

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

Affected products

VendorProductAffected versionsFixed inStatusSource
GitHubview_component2.31.0 to before 2.31.2; 2.32.0 to before 2.49.12.31.2, 2.49.1Patch availableCNA
—view_component (RubyGems)2.31.0 to before 2.31.22.31.2Patch availableGHSA-cm9w-c4rj-r2cf
—view_component (RubyGems)2.32.0 to before 2.49.12.49.1Patch availableGHSA-cm9w-c4rj-r2cf
  • view_component VendorGitHub Affected 2.31.0 to before 2.31.2; 2.32.0 to before 2.49.1 Fixed in 2.31.2, 2.49.1 Patch available CNA
  • view_component (RubyGems) Vendor— Affected 2.31.0 to before 2.31.2 Fixed in 2.31.2 Patch available GHSA-cm9w-c4rj-r2cf
  • view_component (RubyGems) Vendor— Affected 2.32.0 to before 2.49.1 Fixed in 2.49.1 Patch available GHSA-cm9w-c4rj-r2cf

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:github:viewcomponent:*:*:*:*:*:ruby_on_rails:*:*2.31.0 to before 2.31.2; 2.32.0 to before 2.49.1VulnerableGitHub
  • cpe:2.3:a:github:viewcomponent:*:*:*:*:*:ruby_on_rails:*:* Versions 2.31.0 to before 2.31.2; 2.32.0 to before 2.49.1 Vulnerable ·GitHub

Remediation

  • Fix · CNA view_component (github) Fixed in 2.31.2, 2.49.1
  • Fix · GHSA-cm9w-c4rj-r2cf view_component (RubyGems) Fixed in 2.31.2 Advisory →
  • Fix · GHSA-cm9w-c4rj-r2cf view_component (RubyGems) Fixed in 2.49.1 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2022-24722
  2. 2026-10-03 Alias added: GHSA-cm9w-c4rj-r2cf

References

Sources