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.

Project Subscriptions

Vendors Products
Viewcomponent Subscribe
View Component Subscribe
Advisories
Source ID Title
Github GHSA Github GHSA GHSA-hg3h-g7xc-f7vp view_component: System Test Entry Point Path Check Allows Sibling Directory Escape
Fixes

Solution

No solution given by the vendor.


Workaround

No workaround given by the vendor.

History

Tue, 26 May 2026 21:45:00 +0000

Type Values Removed Values Added
First Time appeared Viewcomponent
Viewcomponent view Component
Vendors & Products Viewcomponent
Viewcomponent view Component

Tue, 26 May 2026 20:30:00 +0000

Type Values Removed Values Added
Description 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.
Title view_component: System Test Entry Point Path Check Allows Sibling Directory Escape
Weaknesses CWE-187
References
Metrics cvssV3_1

{'score': 5.9, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N'}


Projects

Sign in to view the affected projects.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-05-26T19:40:47.661Z

Reserved: 2026-05-07T21:21:48.352Z

Link: CVE-2026-44837

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-05-26T21:16:38.853

Modified: 2026-05-26T21:16:38.853

Link: CVE-2026-44837

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-05-26T22:30:18Z

Weaknesses