CVE-2026-54497 view_component: Reused Component Instances Retain Stale Render Context

Medium 6.8 Published Updated

Reusing ViewComponent instances across requests leaks stale context, potentially exposing privileged UI or data to unauthorized users.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-54497?

CVE-2026-54497 is a medium-severity vulnerability in ViewComponent view_component, published on 17 Jul 2026. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

view_component is a framework for building reusable, testable, and encapsulated view components in Ruby on Rails. From 4.0.0 until 4.12.0, ViewComponent::Base instances retain render-scoped objects across calls to render_in; if the same component, collection, or spacer component instance is reused across requests, users, tenants, or threads, later renders can use stale helpers, controller, request, view_flow, format/variant details, and slot child context from an earlier render. This can cause authorization-aware components to render privileged UI for a lower-privileged user, generate links using a stale Host header, leak slot/helper state, and mix request context under concurrent rendering. This issue is fixed in version 4.12.0.

Weakness: CWE-668, CWE-488, CWE-362

Which versions are affected by CVE-2026-54497?

2 open source packages ship an affected version, including view_component. It affects 1 product.

PackageAffectedFixed in
view_component RubyGemsFrom 4.0.04.12.0
view_component RubyGemsFrom 4.0.04.12.0

Products include Viewcomponent View Component.

How do I fix CVE-2026-54497?

Upgrade view_component to 4.12.0 or later.

Is CVE-2026-54497 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-54497 exists.

Sources

Also known as GHSA-9h85-g7w3-rh49.

Is CVE-2026-54497 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free