view_component: around_render HTML-Safety Bypass
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- High · High · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-79.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| ViewComponent | view_component | 4.0.0 to before 4.12.0 | 4.12.0 | Patch available | CNA |
| — | view_component (RubyGems) | 4.0.0 to before 4.12.0 | 4.12.0 | Patch available | GHSA-97jw-64cj-jc58 |
- view_component VendorViewComponent Affected 4.0.0 to before 4.12.0 Fixed in 4.12.0 Patch available CNA
- view_component (RubyGems) Vendor— Affected 4.0.0 to before 4.12.0 Fixed in 4.12.0 Patch available GHSA-97jw-64cj-jc58
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:viewcomponent:view_component:*:*:*:*:*:ruby:*:* | 4.0.0 to before 4.12.0 | Vulnerable | ViewComponent |
- cpe:2.3:a:viewcomponent:view_component:*:*:*:*:*:ruby:*:* Versions 4.0.0 to before 4.12.0 Vulnerable ·ViewComponent
Remediation
- Fix · CNA view_component (ViewComponent) Fixed in 4.12.0
- Fix · GHSA-97jw-64cj-jc58 view_component (RubyGems) Fixed in 4.12.0 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-54498
- 2026-10-03 Alias added: GHSA-97jw-64cj-jc58
References
Patch 2
More ViewComponent View Component vulnerabilities
- TI-2026-32717 view_component: System Test Entry Point Path Check Allows Sibling Directory Escape CVSS 3.1HIGH 7.5
- TI-2026-39343 view_component: Reused Component Instances Retain Stale Render Context CVSS 3.1MEDIUM 6.8
- TI-2024-14361 view_component Cross-site Scripting vulnerability CVSS 3.1MEDIUM 6.1
Sources
- CVE-2026-54498 · CVE Program
- CVE-2026-54498 · NVD
- FIRST EPSS
- GHSA-97jw-64cj-jc58 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences