CVE-2026-44837: view_component Sibling Directory Escape Vulnerability

view_component Updated 09 May 2026

Summary

08/05/2026
Yes i
Moderate
5.9

CVE-2026-44837: view_component: System Test Entry Point Path Check Allows Sibling Directory Escape. 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The view_component package is a Ruby library designed for building reusable view components in Rails applications. It enhances the modularity and maintainability of the UI by allowing developers to create components that encapsulate their own logic and presentation. However, a recent vulnerability has been discovered that allows for potential directory traversal attacks, which could lead to unauthorized file access.

Vulnerability Detail

The vulnerability arises from the way the system test entry point canonicalizes user-controlled file paths using File.realpath. It checks if the resolved path starts with the temp directory path, but this containment check is flawed. Sibling directories can share the same string prefix, allowing an attacker to escape the intended directory and access files outside of it. This could lead to sensitive information disclosure or unauthorized file manipulation, especially in environments where test routes are exposed.

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 implement a stricter check for file paths by requiring a separator boundary. For example:

allowed_prefix = "#{base_path}#{File::SEPARATOR}"
unless @path == base_path || @path.start_with?(allowed_prefix)
  raise ViewComponent::SystemTestControllerNefariousPathError
end

Conclusion

The CVE-2026-44837 vulnerability in the view_component package poses a risk of unauthorized file access due to improper path validation. It is crucial to update to the patched version and implement recommended code changes to secure your application.

See every vulnerability recorded for view_component →

Share this vulnerability

FAQ

CVE-2026-44837 is a vulnerability in the view_component package that allows for sibling directory escape, potentially leading to unauthorized file access.

You can check if your application is affected by using the Vulert playground at Vulert Scanner, which monitors and alerts for open-source vulnerabilities.

The CVSS score for this vulnerability is 5.9, indicating a moderate severity level.

You can update the view_component package by running 'gem update view_component' in your terminal.

If you cannot update the package immediately, implement the suggested workaround to enhance path validation and mitigate the 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