CVE-2022-24722
VIewComponent is a framework for building view components in Ruby on Rails. Versions prior to 2.31.2 and 2.49.1 contain a cross-site scripting vulnerability that has the potential to impact anyone using translations with the view_component gem. Data received via user input and passed as an interpolation argument to the `translate` method is not properly sanitized before display. Versions 2.31.2 and 2.49.1 have been released and fully mitigate the vulnerability. As a workaround, avoid passing user input to the `translate` function, or sanitize the inputs before passing them.
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: 1.09%
- Percentil entre todas las CVEs puntuadas: 64
- 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
- CWE-79
Referencias
- https://github.com/github/view_component/commit/3f82a6e62578ff6f361aba24a1feb2caccf83ff9
- https://github.com/github/view_component/releases/tag/v2.31.2
- https://github.com/github/view_component/releases/tag/v2.49.1
- https://github.com/github/view_component/security/advisories/GHSA-cm9w-c4rj-r2cf
- https://github.com/github/view_component/commit/3f82a6e62578ff6f361aba24a1feb2caccf83ff9
- https://github.com/github/view_component/releases/tag/v2.31.2
- https://github.com/github/view_component/releases/tag/v2.49.1
- https://github.com/github/view_component/security/advisories/GHSA-cm9w-c4rj-r2cf
JSON original (NVD)
Mostrar
{
"id": "CVE-2022-24722",
"cveTags": [],
"metrics": {
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"id": "CVE-2022-24722",
"role": "CISA Coordinator",
"options": [
{
"exploitation": "none"
},
{
"automatable": "no"
},
{
"technicalImpact": "total"
}
],
"version": "2.0.3",
"timestamp": "2025-04-23T15:55:32.558176Z"
}
}
],
"cvssMetricV2": [
{
"type": "Primary",
"source": "nvd@nist.gov",
"cvssData": {
"version": "2.0",
"baseScore": 4.3,
"accessVector": "NETWORK",
"vectorString": "AV:N/AC:M/Au:N/C:N/I:P/A:N",
"authentication": "NONE",
"integrityImpact": "PARTIAL",
"accessComplexity": "MEDIUM",
"availabilityImpact": "NONE",
"confidentialityImpact": "NONE"
},
"acInsufInfo": false,
"impactScore": 2.9,
"baseSeverity": "MEDIUM",
"obtainAllPrivilege": false,
"exploitabilityScore": 8.6,
"obtainUserPrivilege": false,
"obtainOtherPrivilege": false,
"userInteractionRequired": true
}
],
"cvssMetricV31": [
{
"type": "Secondary",
"source": "security-advisories@github.com",
"cvssData": {
"scope": "UNCHANGED",
"version": "3.1",
"baseScore": 8.1,
"attackVector": "NETWORK",
"baseSeverity": "HIGH",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N",
"integrityImpact": "HIGH",
"userInteraction": "REQUIRED",
"attackComplexity": "LOW",
"availabilityImpact": "NONE",
"privilegesRequired": "NONE",
"confidentialityImpact": "HIGH"
},
"impactScore": 5.2,
"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": "github",
"product": "view_component",
"versions": [
{
"status": "affected",
"version": ">= 2.31.0, < 2.31.2"
},
{
"status": "affected",
"version": ">= 2.32.0, < 2.49.1"
}
]
}
]
}
],
"published": "2022-03-02T23:15:09.243",
"references": [
{
"url": "https://github.com/github/view_component/commit/3f82a6e62578ff6f361aba24a1feb2caccf83ff9",
"tags": [
"Patch",
"Third Party Advisory"
],
"source": "security-advisories@github.com"
},
{
"url": "https://github.com/github/view_component/releases/tag/v2.31.2",
"tags": [
"Third Party Advisory"
],
"source": "security-advisories@github.com"
},
{
"url": "https://github.com/github/view_component/releases/tag/v2.49.1",
"tags": [
"Third Party Advisory"
],
"source": "security-advisories@github.com"
},
{
"url": "https://github.com/github/view_component/security/advisories/GHSA-cm9w-c4rj-r2cf",
"tags": [
"Third Party Advisory"
],
"source": "security-advisories@github.com"
},
{
"url": "https://github.com/github/view_component/commit/3f82a6e62578ff6f361aba24a1feb2caccf83ff9",
"tags": [
"Patch",
"Third Party Advisory"
],
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "https://github.com/github/view_component/releases/tag/v2.31.2",
"tags": [
"Third Party Advisory"
],
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "https://github.com/github/view_component/releases/tag/v2.49.1",
"tags": [
"Third Party Advisory"
],
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "https://github.com/github/view_component/security/advisories/GHSA-cm9w-c4rj-r2cf",
"tags": [
"Third Party Advisory"
],
"source": "af854a3a-2127-422b-91ae-364da2661108"
}
],
"vulnStatus": "Modified",
"weaknesses": [
{
"type": "Secondary",
"source": "security-advisories@github.com",
"description": [
{
"lang": "en",
"value": "CWE-79"
}
]
},
{
"type": "Primary",
"source": "nvd@nist.gov",
"description": [
{
"lang": "en",
"value": "CWE-79"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "VIewComponent is a framework for building view components in Ruby on Rails. Versions prior to 2.31.2 and 2.49.1 contain a cross-site scripting vulnerability that has the potential to impact anyone using translations with the view_component gem. Data received via user input and passed as an interpolation argument to the `translate` method is not properly sanitized before display. Versions 2.31.2 and 2.49.1 have been released and fully mitigate the vulnerability. As a workaround, avoid passing user input to the `translate` function, or sanitize the inputs before passing them."
},
{
"lang": "es",
"value": "VIewComponent es un framework para construir componentes de visualización en Ruby on Rails. Las versiones anteriores a 2.31.2 y 2.49.1 contienen una vulnerabilidad de tipo cross-site scripting que presenta el potencial de afectar a cualquiera usando traducciones con la gema view_component. Los datos recibidos por medio de la entrada del usuario y pasados como argumento de interpolación al método \"translate\" no son saneados apropiadamente antes de ser mostrados. Las versiones 2.31.2 y 2.49.1 han sido publicadas y mitigan completamente la vulnerabilidad. Como medida de mitigación, evite pasar entradas del usuario a la función \"translate\", o sanee las entradas antes de pasarlas"
}
],
"lastModified": "2026-06-17T04:32:22.350",
"configurations": [
{
"nodes": [
{
"negate": false,
"cpeMatch": [
{
"criteria": "cpe:2.3:a:github:viewcomponent:*:*:*:*:*:ruby_on_rails:*:*",
"vulnerable": true,
"matchCriteriaId": "8BFBC4AF-7D57-4CB1-9681-DFA439A5936A",
"versionEndExcluding": "2.31.2",
"versionStartIncluding": "2.31.0"
},
{
"criteria": "cpe:2.3:a:github:viewcomponent:*:*:*:*:*:ruby_on_rails:*:*",
"vulnerable": true,
"matchCriteriaId": "DA1CA9C8-326A-4337-915E-BEB92EA1BAD0",
"versionEndExcluding": "2.49.1",
"versionStartIncluding": "2.32.0"
}
],
"operator": "OR"
}
]
}
],
"sourceIdentifier": "security-advisories@github.com"
}