← Back to CVE Explorer

CVE-2026-54498

Full vulnerability record from the local CVENow database.

Description

view_component is a framework for building reusable, testable, and encapsulated view components in Ruby on Rails. From 4.0.0 until 4.12.0, ViewComponent::Base#around_render can return HTML-unsafe strings that bypass the escaping behavior applied to normal #call return values. This creates an XSS risk when downstream applications use around_render to wrap, replace, instrument, or conditionally return content that includes user-controlled data, and ViewComponent::Collection#render_in can amplify the issue by joining per-item results and marking the entire output html_safe, converting raw unsafe output into an ActiveSupport::SafeBuffer. This issue is fixed in version 4.12.0.

Severity
HIGH
CVSS score
8.7 (v3.1)
Vulnerability status
Analyzed
Source identifier
Published
2026-07-17 21:17:09.043000
Last modified
2026-10-24 20:10:00.137000
View original CVE JSON
{
  "id": "CVE-2026-54498",
  "sourceIdentifier": "[email protected]",
  "published": "2026-07-17T21:17:09.043",
  "lastModified": "2026-10-24T20:10:00.137",
  "vulnStatus": "Analyzed",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "view_component is a framework for building reusable, testable, and encapsulated view components in Ruby on Rails. From 4.0.0 until 4.12.0, ViewComponent::Base#around_render can return HTML-unsafe strings that bypass the escaping behavior applied to normal #call return values. This creates an XSS risk when downstream applications use around_render to wrap, replace, instrument, or conditionally return content that includes user-controlled data, and ViewComponent::Collection#render_in can amplify the issue by joining per-item results and marking the entire output html_safe, converting raw unsafe output into an ActiveSupport::SafeBuffer. This issue is fixed in version 4.12.0."
    },
    {
      "lang": "es",
      "value": "view_component es un framework para construir componentes de vista reutilizables, testeables y encapsulados en Ruby on Rails. Desde 4.0.0 hasta 4.12.0, ViewComponent::Base#around_render puede devolver cadenas no seguras para HTML que eluden el comportamiento de escape aplicado a los valores de retorno normales de #call. Esto crea un riesgo de XSS cuando las aplicaciones descendentes usan around_render para envolver, reemplazar, instrumentar o devolver condicionalmente contenido que incluye datos controlados por el usuario, y ViewComponent::Collection#render_in puede amplificar el problema al unir los resultados por elemento y marcar toda la salida html_safe, convirtiendo la salida bruta no segura en un ActiveSupport::SafeBuffer. Este problema está solucionado en la versión 4.12.0."
    }
  ],
  "affected": [
    {
      "source": "[email protected]",
      "affectedData": [
        {
          "vendor": "ViewComponent",
          "product": "view_component",
          "versions": [
            {
              "version": ">= 4.0.0, < 4.12.0",
              "status": "affected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV31": [
      {
        "source": "[email protected]",
        "type": "Secondary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N",
          "baseScore": 8.7,
          "baseSeverity": "HIGH",
          "attackVector": "NETWORK",
          "attackComplexity": "LOW",
          "privilegesRequired": "LOW",
          "userInteraction": "REQUIRED",
          "scope": "CHANGED",
          "confidentialityImpact": "HIGH",
          "integrityImpact": "HIGH",
          "availabilityImpact": "NONE"
        },
        "exploitabilityScore": 2.3,
        "impactScore": 5.8
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "timestamp": "2026-07-20T17:38:49.299715Z",
          "id": "CVE-2026-54498",
          "options": [
            {
              "exploitation": "poc"
            },
            {
              "automatable": "no"
            },
            {
              "technicalImpact": "total"
            }
          ],
          "role": "CISA Coordinator",
          "version": "2.0.3"
        }
      }
    ]
  },
  "weaknesses": [
    {
      "source": "[email protected]",
      "type": "Secondary",
      "description": [
        {
          "lang": "en",
          "value": "CWE-79"
        }
      ]
    }
  ],
  "configurations": [
    {
      "nodes": [
        {
          "operator": "OR",
          "negate": false,
          "cpeMatch": [
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:a:viewcomponent:view_component:*:*:*:*:*:ruby:*:*",
              "versionStartIncluding": "4.0.0",
              "versionEndExcluding": "4.12.0",
              "matchCriteriaId": "F58C083B-CC19-4C20-B5CD-CCFB7827508A"
            }
          ]
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://github.com/ViewComponent/view_component/commit/48e5fd2d602344c7d33019fbc5c8b087e315bb78",
      "source": "[email protected]",
      "tags": [
        "Patch"
      ]
    },
    {
      "url": "https://github.com/ViewComponent/view_component/commit/6796b2e89d0bd7b9d7d763a86275e5334731dd61",
      "source": "[email protected]",
      "tags": [
        "Patch"
      ]
    },
    {
      "url": "https://github.com/ViewComponent/view_component/releases/tag/v4.12.0",
      "source": "[email protected]",
      "tags": [
        "Product",
        "Release Notes"
      ]
    },
    {
      "url": "https://github.com/ViewComponent/view_component/security/advisories/GHSA-97jw-64cj-jc58",
      "source": "[email protected]",
      "tags": [
        "Exploit",
        "Mitigation",
        "Vendor Advisory"
      ]
    },
    {
      "url": "https://github.com/ViewComponent/view_component/security/advisories/GHSA-97jw-64cj-jc58",
      "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
      "tags": [
        "Exploit",
        "Mitigation",
        "Vendor Advisory"
      ]
    }
  ]
}