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

CVE-2026-44836: view_component: Preview Route Can Dispatch Inherited Helper Methods

May 8, 2026 (updated June 8, 2026)

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.

Severity: High if preview routes are externally reachable; Medium otherwise.

Affected files:

  • lib/view_component/preview.rb
  • app/controllers/concerns/view_component/preview_actions.rb
  • app/views/view_components/preview.html.erb

References

  • github.com/ViewComponent/view_component/security/advisories/GHSA-7f3r-gwc9-2995
  • github.com/advisories/GHSA-7f3r-gwc9-2995
  • github.com/rubysec/ruby-advisory-db/blob/master/gems/view_component/CVE-2026-44836.yml
  • nvd.nist.gov/vuln/detail/CVE-2026-44836

Code Behaviors & Features

Detect and mitigate CVE-2026-44836 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 6.5 MEDIUM

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

Learn more about CVSS

Weakness

  • CWE-277: Insecure Inherited Permissions
  • CWE-749: Exposed Dangerous Method or Function

Source file

gem/view_component/CVE-2026-44836.yml

Spotted a mistake? Edit the file on GitLab.

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

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