Skip to content

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

High
camertron published GHSA-cm9w-c4rj-r2cf Mar 2, 2022

Package

bundler view_component (RubyGems)

Affected versions

>= 2.31.0, < 2.31.2
>= 2.32.0, < 2.49.1

Patched versions

2.31.2
2.49.1

Description

Impact

What kind of vulnerability is it? Who is impacted?

This is an XSS 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.

Patches

Has the problem been patched? What versions should users upgrade to?

Versions 2.29.1 and 2.49.1 have been released and fully mitigate the vulnerability.

Workarounds

Is there a way for users to fix or remediate the vulnerability without upgrading?

Avoid passing user input to the translate function, or sanitize the inputs before passing them.

References

Are there any links users can visit to find out more?

For more information

If you have any questions or comments about this advisory:

Severity

High

CVE ID

CVE-2022-24722

Weaknesses