Intel

AIKIDO-2026-11166

view_component is vulnerable to Cross-Site Scripting (XSS)

CVE-2026-54498Published Jun 11, 2026
June 11, 2026

87

CVE Score

High

Cross-Site Scripting (XSS)

Are you affected? Scan for Free

TL;DR

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.

How do I fix this?

Upgrade the view_component library to the patch version.

Who does this affect?

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.

Versions

4.0.0 - 4.11.0

Fixed in 4.12.0

Background info

view_component is vulnerable to Cross-Site Scripting (XSS) in versions 4.0.0 - 4.11.0.

Get secure today,
quickly and for free.

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.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea