view_component is vulnerable to Cross-Site Scripting (XSS)
87
CVE Score
High
Cross-Site Scripting (XSS)
ViewComponent's around_render hook can return HTML-unsafe strings that bypass the escaping applied to normal #call output. When applications use around_render to wrap or replace rendered content with attacker-influenced data, raw HTML may reach browser responses. Collection rendering amplifies the issue by joining per-item results and marking the combined output html_safe. The fix escapes unsafe around_render return values and uses safe_join in Collection#render_in so unsafe per-item output cannot be laundered into a trusted buffer.
Upgrade the view_component library to the patch version.
You are affected if you are using a version that falls within the vulnerable range and your application defines or uses components that override around_render with content that can include attacker-influenced HTML.
4.0.0 - 4.11.0
Fixed in 4.12.0view_component is vulnerable to Cross-Site Scripting (XSS) in versions 4.0.0 - 4.11.0.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.