{"id":"CVE-2022-24722","published":"2022-03-02T22:40:11Z","modified":"2025-04-23T18:59:13Z","title":"Cross-site Scripting in view_component","vendor":"GitHub","product":"view_component","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.1,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01092,"percentile":0.66259,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/github/view_component/security/advisories/GHSA-cm9w-c4rj-r2cf","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/github/view_component/commit/3f82a6e62578ff6f361aba24a1feb2caccf83ff9","tags":["x_refsource_MISC"]},{"url":"https://github.com/github/view_component/releases/tag/v2.31.2","tags":["x_refsource_MISC"]},{"url":"https://github.com/github/view_component/releases/tag/v2.49.1","tags":["x_refsource_MISC"]}],"priority":{"score":18.9,"factors":[{"name":"EPSS percentile","points":13.25},{"name":"CVSS severity","points":5.67}]},"vendorSlug":"github","affectedVersions":[{"vendor":"github","product":"view_component","versions":[">= 2.31.0, < 2.31.2",">= 2.32.0, < 2.49.1"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2025-04-23T15:55:32.558176Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"RubyGems","package":"view_component","vulnerableRanges":[">=2.31.0, <2.31.2",">=2.32.0, <2.49.1"],"patched":["2.31.2","2.49.1"],"from":["GHSA-cm9w-c4rj-r2cf"],"provenance":"source"}],"summary":{"text":"The view_component gem, a framework for building view components in Ruby on Rails, contains a cross-site scripting flaw in its translation handling: user input passed as an interpolation argument to the translate method is not properly sanitized before it is displayed. An attacker can exploit this by supplying crafted input that reaches translate over the network without authentication, but the attack requires a user to interact with the affected page.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T07:18:03Z"},"euvd":{"id":"EUVD-2022-1407","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2022-24722","published":"2022-03-02","fixed":"2.49.1","kev":false},{"cve":"CVE-2024-21636","published":"2024-01-04","fixed":"3.9.0","kev":false,"link":{"from":"CVE-2022-24722","to":"CVE-2024-21636","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"RubyGems:view_component","fromFixed":"2.49.1","toFixed":"2.83.0","daysApart":673}]}},{"cve":"CVE-2026-44836","published":"2026-05-26","fixed":"4.9.0","kev":false},{"cve":"CVE-2026-44837","published":"2026-05-26","fixed":"4.9.0","kev":false}],"package":"RubyGems:view_component"}}