CVE-2022-24722 Details
Description
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.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Apr 23, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/github/view_component/commit/3f82a6e62578ff6f361aba24a1feb2caccf83ff9 | CVE | PatchThird Party Advisory |
| https://github.com/github/view_component/releases/tag/v2.31.2 | CVE | Third Party Advisory |
| https://github.com/github/view_component/releases/tag/v2.49.1 | CVE | Third Party Advisory |
| https://github.com/github/view_component/security/advisories/GHSA-cm9w-c4rj-r2cf | CVE | Third Party Advisory |
| https://github.com/github/view_component/commit/3f82a6e62578ff6f361aba24a1feb2caccf83ff9 | [email protected] | PatchThird Party Advisory |
| https://github.com/github/view_component/releases/tag/v2.31.2 | [email protected] | Third Party Advisory |
| https://github.com/github/view_component/releases/tag/v2.49.1 | [email protected] | Third Party Advisory |
| https://github.com/github/view_component/security/advisories/GHSA-cm9w-c4rj-r2cf | [email protected] | Third Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | [email protected] |
| CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| github viewcomponent | >= 2.31.0, < 2.31.2 >= 2.32.0, < 2.49.1 |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Nov 21, 2024 | CVE Modified | CVE |
| May 14, 2024 | CVE Modified | [email protected] |
| Mar 10, 2022 | Initial Analysis | [email protected] |