CVE-2026-44836: view_component High Severity Vulnerability in Preview Route Dispatching

view_component Updated 09 May 2026

Summary

08/05/2026
Yes i
Moderate
6.5

CVE-2026-44836: view_component: Preview Route Can Dispatch Inherited Helper Methods. Affects view_component versions >= 3.0.0, < 4.9.0. Fixed in 4.9.0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The view_component package is a Ruby library designed to facilitate the creation of reusable view components in Ruby on Rails applications. It allows developers to encapsulate view logic and templates, promoting cleaner code and better separation of concerns. However, a vulnerability has been identified in the preview route functionality, which can lead to unauthorized access to internal templates.

Vulnerability Detail

The vulnerability arises from the preview route's use of public_send to invoke methods based on URL parameters without verifying if those methods are explicitly defined in the preview class. This oversight allows inherited public methods from ViewComponent::Preview to be accessed via the route, potentially exposing sensitive internal Rails templates. An attacker could exploit this by crafting a request that includes parameters to render internal templates, which could lead to the disclosure of secrets, configuration data, or other sensitive information.

How To Fix

Latest published version: 4.19.0 as of 23 Oct 2026

gem install view_component -v 4.19.0

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

4.9.0

This is the first release that contains the fix.

gem install view_component -v 4.9.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, you can restrict access to the preview routes by implementing authentication or authorization checks to ensure that only authorized users can access them. Additionally, you can modify the render_args method to raise an error for any methods not explicitly listed as examples.

Conclusion

In summary, CVE-2026-44836 is a significant vulnerability in the view_component package that can lead to unauthorized access to internal templates. It is crucial to update to the patched version 4.9.0 or later to mitigate this risk. Implementing additional security measures can also help protect your application until the update can be applied.

See every vulnerability recorded for view_component →

Share this vulnerability

FAQ

CVE-2026-44836 is a high severity vulnerability in the view_component package that allows unauthorized access to internal Rails templates through the preview route.

You can check if your application is affected by using Vulert, which monitors open-source vulnerabilities in your software. Visit Vulert Scanner to test your application without any signup.

The vulnerability could allow attackers to render sensitive internal templates, exposing secrets, configuration data, or other sensitive information that should not be accessible.

If you cannot update the package immediately, implement authentication or authorization checks on the preview routes to restrict access to authorized users.

The CVSS score of this vulnerability is 6.5, indicating a moderate to high level of risk.

Related vulnerabilities

Recent vulnerabilities recorded for view_component.

How To Fix

Latest published version: 4.19.0 as of 23 Oct 2026

gem install view_component -v 4.19.0

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

4.9.0

This is the first release that contains the fix.

gem install view_component -v 4.9.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback