p PatchFirst

PatchFirst · Latest vulnerabilities

view_component vulnerabilities

Vulnerabilities published for view_component in the last 30 days: 0. Listed in the KEV catalogue: 0.

Filter vulnerabilities
Clear filters

Vulnerabilities: 6

  1. CVE-2026-54498

    High · CVSS 8.7EPSS 0.45%Fix available

    view_component: around_render HTML-Safety Bypass

    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 iss

    • Update to 4.12.0
    Published Updated
  2. CVE-2026-54497

    Medium · CVSS 6.8EPSS 0.33%Fix available

    view_component: Reused Component Instances Retain Stale Render Context

    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, a

    • Update to 4.12.0
    Published Updated
  3. CVE-2026-44836

    Medium · CVSS 6.5EPSS 0.34%Fix available

    view_component: Preview Route Can Dispatch Inherited Helper Methods

    view_component is a framework for building reusable, testable, and encapsulated view components in Ruby on Rails. From 3.0.0 to 4.9.0, the preview route derives an example name from the URL and calls it with public_send. The code does not verify that the requested method is one of the preview examples explicitly defined by the preview class. As a result, inherited public methods on ViewComponent::Preview are route-reachable. The most important one is render_with_template, which accepts template: and locals:. Those values can come from request params and are later passed to Rails as render template:. If previews are exposed, an attacker can re

    • Update to 4.9.0
    Published Updated
  4. CVE-2026-44837

    Medium · CVSS 5.9EPSS 0.41%Fix available

    view_component: System Test Entry Point Path Check Allows Sibling Directory Escape

    view_component is a framework for building reusable, testable, and encapsulated view components in Ruby on Rails. From 3.0.0 to 4.9.0, the system test entrypoint canonicalizes a user-controlled file path with File.realpath, then checks whether the resolved path starts with the temp directory path. This is not a safe containment check because sibling directories can share the same string prefix. This vulnerability is fixed in 4.9.0.

    • Update to 4.9.0
    Published Updated
  5. CVE-2024-21636

    Medium · CVSS 6.1EPSS 0.5%Fix available

    view_component Cross-site Scripting vulnerability

    view_component is a framework for building reusable, testable, and encapsulated view components in Ruby on Rails. Versions prior to 3.9.0 and 2.83.0 have a cross-site scripting vulnerability that has the potential to impact anyone rendering a component directly from a controller with the view_component gem. Note that only components that define a `#call` method (i.e. instead of using a sidecar template) are affected. The return value of the `#call` method is not sanitized and can include user-defined content. In addition, the return value of the `#output_postamble` methodis not sanitized, which can also lead to cross-site scripting issues. Ve

    • Update to 2.83.0
    • Update to 3.9.0
    Published Updated
  6. CVE-2022-24722

    High · CVSS 8.1EPSS 1.09%Fix available

    Cross-site Scripting in view_component

    VIewComponent is a framework for building view components in Ruby on Rails. Versions prior to 2.31.2 and 2.49.1 contain a cross-site scripting vulnerability that has the potential to impact anyone using translations with the view_component gem. Data received via user input and passed as an interpolation argument to the `translate` method is not properly sanitized before display. Versions 2.31.2 and 2.49.1 have been released and fully mitigate the vulnerability. As a workaround, avoid passing user input to the `translate` function, or sanitize the inputs before passing them.

    • Update to 2.31.2
    • Update to 2.49.1
    Published Updated

Check your server

Check your installed stack and versions against the current vulnerability feeds.

Check your server →