Advisory Database
  • Advisories
  • Dependency Scanning
  1. gem
  2. ›
  3. view_component
  4. ›
  5. CVE-2026-44837

CVE-2026-44837: view_component: System Test Entry Point Path Check Allows Sibling Directory Escape

May 8, 2026 (updated June 8, 2026)

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.

Severity: Medium; test-route scoped.

Example:

Allowed base:  /app/tmp/view_components
Outside path:  /app/tmp/view_components_evil/secret.html.erb

The outside path is not inside the base directory, but it passes:

@path.start_with?(base_path)

References

  • github.com/ViewComponent/view_component/security/advisories/GHSA-hg3h-g7xc-f7vp
  • github.com/advisories/GHSA-hg3h-g7xc-f7vp
  • github.com/rubysec/ruby-advisory-db/blob/master/gems/view_component/CVE-2026-44837.yml
  • nvd.nist.gov/vuln/detail/CVE-2026-44837

Code Behaviors & Features

Detect and mitigate CVE-2026-44837 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions starting from 3.0.0 before 4.9.0

Fixed versions

  • 4.9.0

Solution

Upgrade to version 4.9.0 or above.

Impact 5.9 MEDIUM

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-187: Partial String Comparison
  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Source file

gem/view_component/CVE-2026-44837.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:15:51 +0000.