GHSA-97jw-64cj-jc58: ViewComponent: around_render HTML-Safety Bypass
ViewComponent versions >=4.0.0 and <4.12.0 contain a vulnerability where the around_render method can return HTML-unsafe strings that bypass normal escaping, leading to cross-site scripting (XSS) risks. This issue is amplified in collection rendering where outputs are joined and marked as html_safe, causing raw unsafe content to be trusted and rendered directly. The vulnerability arises because around_render return values are not passed through the usual HTML escaping mechanisms applied to call method outputs. This can allow attacker-controlled data to be rendered as raw HTML if used improperly in around_render, especially in downstream applications that use around_render for wrapping or instrumentation.
AI Analysis
Technical Summary
The ViewComponent Ruby gem has an XSS vulnerability in the around_render method of ViewComponent::Base. Unlike the call method, which escapes HTML-unsafe strings, around_render can return raw strings that bypass escaping. When used in collection rendering, the joined output is marked html_safe, causing unsafe user input to be rendered as trusted HTML. This discrepancy creates a security risk when around_render returns user-controlled content, allowing injection of malicious scripts. The vulnerability affects versions >=4.0.0 and <4.12.0. The root cause is that around_render return values are not processed by the __vc_maybe_escape_html method, unlike call outputs. This leads to inconsistent output safety and enables XSS attacks in applications that use around_render to wrap or modify rendered content.
Potential Impact
Successful exploitation allows an attacker to inject arbitrary HTML and JavaScript into the rendered output of a ViewComponent, leading to cross-site scripting (XSS). This can compromise user sessions, steal sensitive information, or perform actions on behalf of users. The issue is particularly severe in collection rendering where multiple component outputs are concatenated and marked as html_safe, amplifying the risk. The vulnerability requires that the around_render method returns attacker-controlled data without proper escaping.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, avoid returning user-controlled or unescaped data from the around_render method. Prefer using the call method for rendering user content or ensure explicit HTML escaping is applied to any data returned by around_render. Review usage of around_render in your components to prevent unsafe raw HTML output. Monitor the official ViewComponent repository and vendor advisories for patches or updates addressing this issue.
GHSA-97jw-64cj-jc58: ViewComponent: around_render HTML-Safety Bypass
Description
ViewComponent versions >=4.0.0 and <4.12.0 contain a vulnerability where the around_render method can return HTML-unsafe strings that bypass normal escaping, leading to cross-site scripting (XSS) risks. This issue is amplified in collection rendering where outputs are joined and marked as html_safe, causing raw unsafe content to be trusted and rendered directly. The vulnerability arises because around_render return values are not passed through the usual HTML escaping mechanisms applied to call method outputs. This can allow attacker-controlled data to be rendered as raw HTML if used improperly in around_render, especially in downstream applications that use around_render for wrapping or instrumentation.
CVSS v3.1
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The ViewComponent Ruby gem has an XSS vulnerability in the around_render method of ViewComponent::Base. Unlike the call method, which escapes HTML-unsafe strings, around_render can return raw strings that bypass escaping. When used in collection rendering, the joined output is marked html_safe, causing unsafe user input to be rendered as trusted HTML. This discrepancy creates a security risk when around_render returns user-controlled content, allowing injection of malicious scripts. The vulnerability affects versions >=4.0.0 and <4.12.0. The root cause is that around_render return values are not processed by the __vc_maybe_escape_html method, unlike call outputs. This leads to inconsistent output safety and enables XSS attacks in applications that use around_render to wrap or modify rendered content.
Potential Impact
Successful exploitation allows an attacker to inject arbitrary HTML and JavaScript into the rendered output of a ViewComponent, leading to cross-site scripting (XSS). This can compromise user sessions, steal sensitive information, or perform actions on behalf of users. The issue is particularly severe in collection rendering where multiple component outputs are concatenated and marked as html_safe, amplifying the risk. The vulnerability requires that the around_render method returns attacker-controlled data without proper escaping.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, avoid returning user-controlled or unescaped data from the around_render method. Prefer using the call method for rendering user content or ensure explicit HTML escaping is applied to any data returned by around_render. Review usage of around_render in your components to prevent unsafe raw HTML output. Monitor the official ViewComponent repository and vendor advisories for patches or updates addressing this issue.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-97jw-64cj-jc58
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-54498"]
- Ecosystems
- ["RubyGems"]
- Database Specific Severity
- HIGH
- Cvss Version
- 3.1
Threat ID: 6a58b40468715ace43d67071
Added to database: 07/16/2026, 10:35:48 UTC
Last enriched: 07/16/2026, 10:48:58 UTC
Last updated: 07/16/2026, 11:48:10 UTC
Views: 3
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.