Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') Affecting view_component package, versions <2.83.0 >=3.0.0, <3.9.0
Threat Intelligence
Do your applications use this vulnerable package?
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applications- Snyk ID SNYK-RUBY-VIEWCOMPONENT-6144786
- published 5 Jan 2024
- disclosed 4 Jan 2024
- credit Blake Williams
Introduced: 4 Jan 2024
CVE-2024-21636 Open this link in a new tabHow to fix?
Upgrade view_component
to version 2.83.0, 3.9.0 or higher.
Overview
Affected versions of this package are vulnerable to Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') via the #call
and #output_postamble
methods. An attacker can inject malicious scripts that may be executed in the context of the user's browser session by including user-defined content that is not properly sanitized.
Note:
This is exploitable via the #call
method only if a component that defines it is rendered directly from a controller.
Workaround
This vulnerability can be mitigated by sanitizing the return value of #call
.