{"cve":"CVE-2022-24722","nvd":{"published":"2022-03-02T23:15:09.243","modified":"2026-06-17T04:32:22.350","status":"Modified","description":"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_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1},"cwes":["CWE-79"],"references":["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"],"products":["github:viewcomponent"],"source":"nvd","synced_at":"2026-10-19T21:28:04.509275555+00:00"},"epss":{"cve":"CVE-2022-24722","score":0.01092,"percentile":0.65419,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-cm9w-c4rj-r2cf","url":"https://osv.dev/vulnerability/GHSA-cm9w-c4rj-r2cf","summary":"Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in view_component","modified":"2024-02-16T07:51:13.975898Z","packages":[{"ecosystem":"RubyGems","name":"view_component","purl":"pkg:gem/view_component","ranges":[">=2.31.0 <2.31.2"],"fixed":["2.31.2"]},{"ecosystem":"RubyGems","name":"view_component","purl":"pkg:gem/view_component","ranges":[">=2.32.0 <2.49.1"],"fixed":["2.49.1"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}