Skip to content
Heist/ feed
Back to feed
Medium

view_component: Preview Route Can Dispatch Inherited Helper Methods

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-44836
Confirmed fixed CVEs
Not specified
Updated in this feed
2 Nov 2026, 21:38 UTC · Revision 1

Source evidence

view_component: Preview Route Can Dispatch Inherited Helper Methods

core-osv · Original source

Published 26 May 2026, 19:43 UTC

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.

osv:CVE-2026-44836
Complete source record
{
  "id": "0deee24fa9104e4ce499e9d1685c370412d5cdf3aa3e0d17ee247c619a71ebd4",
  "url": "https://osv.dev/vulnerability/CVE-2026-44836",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "view_component: Preview Route Can Dispatch Inherited Helper Methods",
    "summary": "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.",
    "evidence": "osv:CVE-2026-44836",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2026-44836",
      "aliases": [
        "CVE-2026-44836",
        "GHSA-7f3r-gwc9-2995"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/viewcomponent/view_component",
              "type": "GIT",
              "events": [
                {
                  "introduced": "c696930250b696fb5528be08edea13a0c78b8325"
                },
                {
                  "fixed": "458281bc49851e3090638cf6d011e84fcd49f2da"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "3.0.0"
                      },
                      {
                        "fixed": "4.9.0"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "4.9.0"
                      }
                    ],
                    "source": "DESCRIPTION"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v4.8.0",
            "v4.7.0",
            "v4.6.0",
            "v4.5.0",
            "v4.4.0",
            "v4.3.0",
            "v4.2.0",
            "v4.1.1",
            "v3.23.2",
            "v4.1.0",
            "v4.0.2",
            "v4.0.1",
            "v4.0.0",
            "v4.0.0.rc5",
            "v4.0.0.rc4",
            "v4.0.0.rc3",
            "v4.0.0.rc2",
            "v4.0.0.rc1",
            "4.0.0.rc1",
            "v3.23.1",
            "v3.23.0",
            "v3.22.0",
            "v3.21.0",
            "v3.20.0",
            "v3.19.0",
            "v3.18.0",
            "v3.17.0",
            "v3.16.0",
            "v3.15.1",
            "v3.15.0",
            "v3.14.0",
            "v3.13.0",
            "v3.12.1",
            "v3.12.0",
            "v3.11.0",
            "v3.10.0",
            "v3.9.0",
            "v3.8.0",
            "v3.7.0",
            "v3.6.0",
            "v3.5.0",
            "v3.3.0",
            "v3.2.0",
            "v3.1.0",
            "v3.0.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-44836.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:23.833924325Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/44xxx/CVE-2026-44836.json",
        "https://github.com/ViewComponent/view_component/security/advisories/GHSA-7f3r-gwc9-2995",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-44836"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-749"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/44xxx/CVE-2026-44836.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-44836",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 490087,
  "published_at": "2026-05-26T19:43:58.008+00:00"
}