view_component vulnerabilities

A framework for building reusable, testable & encapsulated view components in Ruby on Rails.

Registry
RubyGems
Latest
4.24.0
License
MIT

6 known advisories

The latest version, 4.24.0, is not affected by any of them. Projects on older versions may be.

Update to the latest version:bundle update --conservative view_component # Gemfile: '>= 4.24.0'

Is your project on an affected view_component?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Rails or Ruby apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Security advisories for view_component

  • MediumCVE-2026-54497GHSA-9h85-g7w3-rh4915 Jul 2026

    ViewComponent: Reused Component Instances Retain Stale Render Context

    Affected
    >=4.0.0 <4.12.0
    Fixed in
    4.12.0
  • HighCVE-2026-54498GHSA-97jw-64cj-jc5815 Jul 2026

    ViewComponent: around_render HTML-Safety Bypass

    Affected
    >=4.0.0 <4.12.0
    Fixed in
    4.12.0
  • MediumCVE-2026-44837GHSA-hg3h-g7xc-f7vp8 May 2026

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

    Affected
    >=3.0.0 <4.9.0
    Fixed in
    4.9.0
  • MediumCVE-2026-44836GHSA-7f3r-gwc9-29958 May 2026

    view_component: Preview Route Can Dispatch Inherited Helper Methods

    Affected
    >=3.0.0 <4.9.0
    Fixed in
    4.9.0
  • MediumCVE-2024-21636GHSA-wf2x-8w6j-qw374 Jan 2024

    view_component Cross-site Scripting vulnerability

    Affected
    >=3.0.0 <3.9.0 · <2.83.0
    Fixed in
    2.83.0, 3.9.0
  • HighCVE-2022-24722GHSA-cm9w-c4rj-r2cf2 Mar 2022

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in view_component

    Affected
    >=2.31.0 <2.31.2 · >=2.32.0 <2.49.1
    Fixed in
    2.31.2, 2.49.1

Is your view_component version vulnerable?

Which of your client projects still run an old view_component?

NPMscan reads the Gemfile.lock in every GitHub repo you pick and checks each installed version against these advisories, including the packages your packages pull in. Each finding comes with the command that fixes it.

Other RubyGems packages

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily. Package details from the RubyGems registry.