CVE-2026-54498 Details
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#around_render can return HTML-unsafe strings that bypass the escaping behavior applied to normal #call return values. This creates an XSS risk when downstream applications use around_render to wrap, replace, instrument, or conditionally return content that includes user-controlled data, and ViewComponent::Collection#render_in can amplify the issue by joining per-item results and marking the entire output html_safe, converting raw unsafe output into an ActiveSupport::SafeBuffer. This issue is fixed in version 4.12.0.
A vulnerability exists in the ViewComponent library for Ruby on Rails, specifically in versions 4.0.0 through 4.12.0. The issue arises in the ViewComponent::Base#around_render method, which can return HTML-unsafe strings that bypass the normal escaping applied to #call return values. This creates a risk of cross-site scripting (XSS) attacks, particularly when user-controlled data is involved. The vulnerability is amplified in collection rendering, where the output is marked as html_safe, converting raw unsafe content into a trusted ActiveSupport::SafeBuffer.
Users can update to ViewComponent version 4.12.0, which fixes the vulnerability by ensuring that around_render output is properly escaped and not marked as html_safe. Instructions for updating can be found in the ViewComponent repository.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jul 20, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/ViewComponent/view_component/security/advisories/GHSA-97jw-64cj-jc58 | CISA-ADP | ExploitMitigationVendor Advisory |
| https://github.com/ViewComponent/view_component/commit/48e5fd2d602344c7d33019fbc5c8b087e315bb78 | [email protected] | Patch |
| https://github.com/ViewComponent/view_component/commit/6796b2e89d0bd7b9d7d763a86275e5334731dd61 | [email protected] | Patch |
| https://github.com/ViewComponent/view_component/releases/tag/v4.12.0 | [email protected] | ProductRelease Notes |
| https://github.com/ViewComponent/view_component/security/advisories/GHSA-97jw-64cj-jc58 | [email protected] | ExploitMitigationVendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| viewcomponent view component | >= 4.0.0, < 4.12.0 |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 29, 2026 | Initial Analysis | [email protected] |
| Jul 20, 2026 | CVE Modified | CISA-ADP |
| Jul 17, 2026 | New CVE Received | [email protected] |