5.9
Medium
view_component

CVE-2026-44837

CVE-2026-44837 is a medium-severity path traversal vulnerability in view_component (rubygems), affecting versions >= 3.0.0, < 4.9.0. It is fixed in 4.9.0.

Key facts
CVSS score
5.9
Medium
Attack vector
Network
Issuing authority
GitHub Advisory Database
Affected package
view_component
Fixed in
4.9.0
Disclosed
2026

Summary

Summary 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: The outside path is not inside the base directory, but it passes: Relevant Code app/controllers/viewcomponentssystemtestcontroller.rb: The route then renders the resolved file: Exploit Flow Example request: Flow: basepath resolves to .../tmp/viewcomponents. The payload resolves to .../tmp/viewcomponentsevil/secret.html.erb. That path is outside the intended temp directory. The string prefix check still passes. Rails renders the sibling file. The route is mounted only in Rails.env.test?, which is why Medium is more appropriate than P1. The issue matters if test routes are reachable in shared CI, staging, review apps, or any accidentally exposed test-mode deployment. Targeted Fuzz Result The following sibling paths passed an equivalent realpath plus startwith? harness while resolving outside the base directory: PoC Test Create test/sandbox/test/systemtestentrypointpathtraversalpoctest.rb: Run: Vulnerable behavior: the response succeeds and contains VCSYSTEMTESTTRAVERSALPOC. Fixed behavior: the request raises ViewComponent::SystemTestControllerNefariousPathError or otherwise fails without rendering the file. Suggested Fix Use path-aware containment instead of a raw string prefix. For example: Or require a separator boundary: Add regression tests for: A normal temp file inside tmp/viewcomponents ../../README.md ../viewcomponentsevil/secret.html.erb A symlink inside the temp directory that resolves outside it

Impact

What is path traversal?

Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files. Typical impact: unauthorized file read or write outside the intended directory.

Severity and exposure

CVE-2026-44837 has a CVSS score of 5.9 (Medium). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment.

A fixed version is available (4.9.0). Upgrading removes the vulnerable code path.

Affected versions

rubygems

  • view_component (>= 3.0.0, < 4.9.0)

Security releases

  • view_component → 4.9.0 (rubygems)
Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter instead of chasing every advisory.

Kodem's runtime-powered SCA identifies whether CVE-2026-44837 is reachable in your applications. Explore open-source security for your team.

See if CVE-2026-44837 is reachable in your applications. Get a demo

Remediation advice

Upgrade view_component to 4.9.0 or later to resolve this vulnerability.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently asked questions about CVE-2026-44837

What is CVE-2026-44837?

CVE-2026-44837 is a medium-severity path traversal vulnerability in view_component (rubygems), affecting versions >= 3.0.0, < 4.9.0. It is fixed in 4.9.0. Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files.

How severe is CVE-2026-44837?

CVE-2026-44837 has a CVSS score of 5.9 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.

Which versions of view_component are affected by CVE-2026-44837?

view_component (rubygems) versions >= 3.0.0, < 4.9.0 is affected.

Is there a fix for CVE-2026-44837?

Yes. CVE-2026-44837 is fixed in 4.9.0. Upgrade to this version or later.

Is CVE-2026-44837 exploitable, and should I be worried?

Whether CVE-2026-44837 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo

What actually determines whether CVE-2026-44837 is exploitable, and how bad it is?

Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.

How do I fix CVE-2026-44837?

Upgrade view_component to 4.9.0 or later.

Stop the waste.
Protect your environment with Kodem.