Unknown · Viewcomponent · CVE-2022-24722
**Name of the Vulnerable Software and Affected Versions**
ViewComponent versions prior to 2.31.2
ViewComponent versions prior to 2.49.1
**Description**
The issue is related to a cross-site scripting vulnerability in the view component gem, specifically affecting translations. Data received via user input and passed as an interpolation argument to the `translate` method is not properly sanitized before display.
**Recommendations**
For versions prior to 2.31.2, update to version 2.31.2 or later to fully mitigate the vulnerability.
For versions prior to 2.49.1, update to version 2.49.1 or later to fully mitigate the vulnerability.
As a temporary workaround, consider avoiding passing user input to the `translate` function, or sanitize the inputs before passing them.