# CVE-2022-24722: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in view_component

Source: https://junglewise.ai/threats/cve-2022-24722-improper-neutralization-of-input-during-web-page-generation-cross  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2022-03-02  
License: CC BY 4.0 with a link back

CVE-2022-24722 · Severity: low · CVSS 3.1 · Published 2022-03-02

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in view_component

Technologies: [view_component (RubyGems)](https://junglewise.ai/threats/technologies/view-component). Vendors: [RubyGems](https://junglewise.ai/threats/vendors/rubygems).

## Quick answers

**Is CVE-2022-24722 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2022-24722 being exploited in the wild.

**How severe is CVE-2022-24722?** Low severity, with a CVSS score of 3.1, published 2 March 2022.

**Which products and versions are affected?** view_component (RubyGems) ECOSYSTEM:introduced=2.31.0,fixed=2.31.2.

**Is there a fix for CVE-2022-24722?** Yes. view_component (RubyGems): upgrade to 2.31.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2022-24722?** Check whether you run view_component (RubyGems) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- view_component (RubyGems): upgrade to 2.31.2 or later

  ```sh
  bundle update view_component
  ```


## Affected products

- view_component (RubyGems) ECOSYSTEM:introduced=2.31.0,fixed=2.31.2

## Identifiers

- CVE-2022-24722
- GHSA-cm9w-c4rj-r2cf

## Related threats

- [ViewComponent XSS via around_render HTML-safety bypass](https://junglewise.ai/threats/cve-2026-54498-viewcomponent-xss-via-around-render-html-safety-bypass)
- [ViewComponent stale render context in reused component instances](https://junglewise.ai/threats/cve-2026-54497-viewcomponent-stale-render-context-in-reused-component-instances)
- [ViewComponent path traversal in system test entrypoint](https://junglewise.ai/threats/cve-2026-44837-viewcomponent-path-traversal-in-system-test-entrypoint)
- [ViewComponent unauthorized template rendering in preview route](https://junglewise.ai/threats/cve-2026-44836-viewcomponent-unauthorized-template-rendering-in-preview-route)
- [view_component Cross-site Scripting vulnerability](https://junglewise.ai/threats/cve-2024-21636-view-component-cross-site-scripting-vulnerability)
