{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2022-24722","id":"CVE-2022-24722","title":"Cross-site Scripting in view_component","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 an","descriptionLong":"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.","published":"2022-03-02T22:40:11.000Z","updated":"2026-10-28T02:30:58.569674677Z","reserved":"2022-02-10T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N","rating":"high","source":"GitHub_M"},"metrics":[{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N","rating":"high","source":"GitHub_M"},{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N","rating":"high","source":"github.com"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"NVD"},{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N","rating":"high","source":"OSV"},{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N","rating":"high","source":"GitHub"},{"version":"2.0","score":4.3,"vector":"AV:N/AC:M/Au:N/C:N/I:P/A:N","rating":"medium","source":"NVD"}],"rating":"high","products":["github view_component"],"affectedProducts":[{"vendor":"github","product":"view_component","defaultStatus":null,"versions":[{"status":"affected","version":">= 2.31.0, < 2.31.2"},{"status":"affected","version":">= 2.32.0, < 2.49.1"}],"platforms":[]}],"packages":[{"ecosystem":"RubyGems","name":"view_component","purl":"pkg:gem/view_component","ranges":[">=2.31.0 <2.31.2",">=2.32.0 <2.49.1"],"fixed":["2.31.2","2.49.1"],"advisory":"GHSA-cm9w-c4rj-r2cf"}],"cwes":["CWE-79"],"aliases":["GHSA-cm9w-c4rj-r2cf"],"references":[{"url":"https://github.com/github/view_component/security/advisories/GHSA-cm9w-c4rj-r2cf","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://github.com/github/view_component/commit/3f82a6e62578ff6f361aba24a1feb2caccf83ff9","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://github.com/github/view_component/releases/tag/v2.31.2","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","web"]},{"url":"https://github.com/github/view_component/releases/tag/v2.49.1","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/24xxx/CVE-2022-24722.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-24722","tags":["advisory"]},{"url":"https://github.com/github/view_component","tags":["web"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/view_component/CVE-2022-24722.yml","tags":["web"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total"},"epss":0.01092,"epssPercentile":0.66114,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2022-24722","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-24722","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2022-24722","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-cm9w-c4rj-r2cf","ok":true,"note":"GHSA-cm9w-c4rj-r2cf"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2022-24722","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}