CVE-2024-21636
view_component is a framework for building reusable, testable, and encapsulated view components in Ruby on Rails. Versions prior to 3.9.0 and 2.83.0 have a cross-site scripting vulnerability that has the potential to impact anyone rendering a component directly from a controller with the view_component gem. Note that only components that define a `#call` method (i.e. instead of using a sidecar template) are affected. The return value of the `#call` method is not sanitized and can include user-defined content.
Leer descripción completaMostrar menos
In addition, the return value of the `#output_postamble` methodis not sanitized, which can also lead to cross-site scripting issues. Versions 3.9.0 and 2.83.0 have been released and fully mitigate both the `#call` and the `#output_postamble` vulnerabilities. As a workaround, sanitize the return value of `#call`.
CVSS
- Versión: 3.1
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- Puntuación base: 6.1
Probabilidad de explotación (EPSS)
- Probabilidad de explotación en los próximos 30 días: 0.50%
- Percentil entre todas las CVEs puntuadas: 40
- Fecha de la puntuación: 4/10/2026
EPSS (Exploit Prediction Scoring System, de FIRST) estima la probabilidad de que una vulnerabilidad sea explotada en 30 días. Complementa a CVSS (impacto) y a CISA KEV (explotación confirmada).
Tecnologías afectadas (1)
CWE
- CWE-79
Referencias
- https://github.com/ViewComponent/view_component/commit/0d26944a8d2730ea40e60eae23d70684483e5017
- https://github.com/ViewComponent/view_component/commit/c43d8bafa7117cbce479669a423ab266de150697
- https://github.com/ViewComponent/view_component/pull/1950
- https://github.com/ViewComponent/view_component/pull/1962
- https://github.com/ViewComponent/view_component/security/advisories/GHSA-wf2x-8w6j-qw37
- https://github.com/ViewComponent/view_component/commit/0d26944a8d2730ea40e60eae23d70684483e5017
- https://github.com/ViewComponent/view_component/commit/c43d8bafa7117cbce479669a423ab266de150697
- https://github.com/ViewComponent/view_component/pull/1950
- https://github.com/ViewComponent/view_component/pull/1962
- https://github.com/ViewComponent/view_component/security/advisories/GHSA-wf2x-8w6j-qw37
JSON original (NVD)
Mostrar
{
"id": "CVE-2024-21636",
"cveTags": [],
"metrics": {
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"id": "CVE-2024-21636",
"role": "CISA Coordinator",
"options": [
{
"exploitation": "none"
},
{
"automatable": "no"
},
{
"technicalImpact": "partial"
}
],
"version": "2.0.3",
"timestamp": "2024-01-09T21:13:15.952519Z"
}
}
],
"cvssMetricV31": [
{
"type": "Secondary",
"source": "security-advisories@github.com",
"cvssData": {
"scope": "CHANGED",
"version": "3.1",
"baseScore": 6.1,
"attackVector": "NETWORK",
"baseSeverity": "MEDIUM",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
"integrityImpact": "LOW",
"userInteraction": "REQUIRED",
"attackComplexity": "LOW",
"availabilityImpact": "NONE",
"privilegesRequired": "NONE",
"confidentialityImpact": "LOW"
},
"impactScore": 2.7,
"exploitabilityScore": 2.8
},
{
"type": "Primary",
"source": "nvd@nist.gov",
"cvssData": {
"scope": "CHANGED",
"version": "3.1",
"baseScore": 6.1,
"attackVector": "NETWORK",
"baseSeverity": "MEDIUM",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
"integrityImpact": "LOW",
"userInteraction": "REQUIRED",
"attackComplexity": "LOW",
"availabilityImpact": "NONE",
"privilegesRequired": "NONE",
"confidentialityImpact": "LOW"
},
"impactScore": 2.7,
"exploitabilityScore": 2.8
}
]
},
"affected": [
{
"source": "security-advisories@github.com",
"affectedData": [
{
"vendor": "ViewComponent",
"product": "view_component",
"versions": [
{
"status": "affected",
"version": ">= 3.0.0, < 3.9.0"
},
{
"status": "affected",
"version": "< 2.83.0"
}
]
}
]
}
],
"published": "2024-01-04T20:15:25.300",
"references": [
{
"url": "https://github.com/ViewComponent/view_component/commit/0d26944a8d2730ea40e60eae23d70684483e5017",
"tags": [
"Patch"
],
"source": "security-advisories@github.com"
},
{
"url": "https://github.com/ViewComponent/view_component/commit/c43d8bafa7117cbce479669a423ab266de150697",
"tags": [
"Patch"
],
"source": "security-advisories@github.com"
},
{
"url": "https://github.com/ViewComponent/view_component/pull/1950",
"tags": [
"Exploit",
"Issue Tracking",
"Patch"
],
"source": "security-advisories@github.com"
},
{
"url": "https://github.com/ViewComponent/view_component/pull/1962",
"tags": [
"Issue Tracking"
],
"source": "security-advisories@github.com"
},
{
"url": "https://github.com/ViewComponent/view_component/security/advisories/GHSA-wf2x-8w6j-qw37",
"tags": [
"Vendor Advisory"
],
"source": "security-advisories@github.com"
},
{
"url": "https://github.com/ViewComponent/view_component/commit/0d26944a8d2730ea40e60eae23d70684483e5017",
"tags": [
"Patch"
],
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "https://github.com/ViewComponent/view_component/commit/c43d8bafa7117cbce479669a423ab266de150697",
"tags": [
"Patch"
],
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "https://github.com/ViewComponent/view_component/pull/1950",
"tags": [
"Exploit",
"Issue Tracking",
"Patch"
],
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "https://github.com/ViewComponent/view_component/pull/1962",
"tags": [
"Issue Tracking"
],
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "https://github.com/ViewComponent/view_component/security/advisories/GHSA-wf2x-8w6j-qw37",
"tags": [
"Vendor Advisory"
],
"source": "af854a3a-2127-422b-91ae-364da2661108"
}
],
"vulnStatus": "Modified",
"weaknesses": [
{
"type": "Secondary",
"source": "security-advisories@github.com",
"description": [
{
"lang": "en",
"value": "CWE-79"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "view_component is a framework for building reusable, testable, and encapsulated view components in Ruby on Rails. Versions prior to 3.9.0 and 2.83.0 have a cross-site scripting vulnerability that has the potential to impact anyone rendering a component directly from a controller with the view_component gem. Note that only components that define a `#call` method (i.e. instead of using a sidecar template) are affected. The return value of the `#call` method is not sanitized and can include user-defined content. In addition, the return value of the `#output_postamble` methodis not sanitized, which can also lead to cross-site scripting issues. Versions 3.9.0 and 2.83.0 have been released and fully mitigate both the `#call` and the `#output_postamble` vulnerabilities. As a workaround, sanitize the return value of `#call`."
},
{
"lang": "es",
"value": "view_component es un framework para crear componentes de vista reutilizables, comprobables y encapsulados en Ruby on Rails. Las versiones anteriores a la 3.9.0 tienen una vulnerabilidad de cross site scripting que tiene el potencial de afectar a cualquiera que renderice un componente directamente desde un controlador con la gema view_component. Tenga en cuenta que sólo se ven afectados los componentes que definen un método `#call` (es decir, en lugar de utilizar una plantilla complementaria). El valor de retorno del método `#call` no está sanitizado y puede incluir contenido definido por el usuario. Además, el valor de retorno del método `#output_postamble` no está sanitizado, lo que también puede provocar problemas de cross site scripting. Se lanzó la versión 3.9.0 y mitiga por completo las vulnerabilidades `#call` y `#output_postamble`. Como workaround, sanitice valor de retorno de `#call`."
}
],
"lastModified": "2026-06-17T07:09:53.780",
"configurations": [
{
"nodes": [
{
"negate": false,
"cpeMatch": [
{
"criteria": "cpe:2.3:a:viewcomponent:view_component:*:*:*:*:*:ruby:*:*",
"vulnerable": true,
"matchCriteriaId": "7E014569-73E5-4B59-8BC9-4EE2E2EE7F8E",
"versionEndExcluding": "2.83.0"
},
{
"criteria": "cpe:2.3:a:viewcomponent:view_component:*:*:*:*:*:ruby:*:*",
"vulnerable": true,
"matchCriteriaId": "A7D836B9-1CF7-4AEA-9FC7-BA0EEFDE3465",
"versionEndExcluding": "3.9.0",
"versionStartIncluding": "3.0.0"
}
],
"operator": "OR"
}
]
}
],
"sourceIdentifier": "security-advisories@github.com"
}