Vulnerability · Published May 26, 2026 · Assigned by GitHub_M
CVE-2026-44836view_component: Preview Route Can Dispatch Inherited Helper Methods
Medium 6.5
In plain English
A medium-severity security flaw in view_component from ViewComponent. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 28% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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 preview route derives an example name from the URL and calls it with public_send. The code does not verify that the requested method is one of the preview examples explicitly defined by the preview class. As a result, inherited public methods on ViewComponent::Preview are route-reachable. The most important one is render_with_template, which accepts template: and locals:. Those values can come from request params and are later passed to Rails as render template:. If previews are exposed, an attacker can render internal Rails templates that are not otherwise routable. This vulnerability is fixed in 4.9.0.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | ruby-view-component | no fix listed | DEBIAN-CVE-2026-44836 |
| Debian:14 | ruby-view-component | 4.12.0-1 | DEBIAN-CVE-2026-44836 |
| RubyGems | view_component | 4.9.0 | GHSA-7f3r-gwc9-2995 |
| Ubuntu:24.04:LTS | ruby-view-component | no fix listed | UBUNTU-CVE-2026-44836 |
| Ubuntu:26.10 | ruby-view-component | no fix listed | UBUNTU-CVE-2026-44836 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| ViewComponent | view_component | >= 3.0.0, < 4.9.0 |
Weakness: CWE-749 · Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N