Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

GHSA-97jw-64cj-jc58: ViewComponent: around_render HTML-Safety Bypass

0
High
Published: 07/15/2026 (07/15/2026, 22:51:04 UTC)
Source: GCVE Database
Product: view_component

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

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
None
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N

Affected software

RubyGemsghsa
view_component
Affected versions
>=4.0.0 <4.12.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/16/2026, 10:48:58 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses