{"url":"http://public2.vulnerablecode.io/api/packages/164247?format=json","purl":"pkg:gem/view_component@2.25.0","type":"gem","namespace":"","name":"view_component","version":"2.25.0","qualifiers":{},"subpath":"","is_vulnerable":true,"next_non_vulnerable_version":"2.83.0","latest_non_vulnerable_version":"4.9.0","affected_by_vulnerabilities":[{"url":"http://public2.vulnerablecode.io/api/vulnerabilities/46787?format=json","vulnerability_id":"VCID-fk74-z1fr-1uem","summary":"Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')\nview_component is a framework for building reusable, testable, and encapsulated view components in Ruby on Rails. Versions prior to 3.9.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 has been released and fully mitigates both the `#call` and the `#output_postamble` vulnerabilities. As a workaround, sanitize the return value of `#call`.","references":[{"reference_url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/view_component/CVE-2024-21636.yml","reference_id":"","reference_type":"","scores":[{"value":"6.1","scoring_system":"cvssv3.1","scoring_elements":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"},{"value":"MODERATE","scoring_system":"generic_textual","scoring_elements":""}],"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/view_component/CVE-2024-21636.yml"},{"reference_url":"https://github.com/ViewComponent/view_component","reference_id":"","reference_type":"","scores":[{"value":"6.1","scoring_system":"cvssv3.1","scoring_elements":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"},{"value":"MODERATE","scoring_system":"generic_textual","scoring_elements":""}],"url":"https://github.com/ViewComponent/view_component"},{"reference_url":"https://github.com/ViewComponent/view_component/commit/0d26944a8d2730ea40e60eae23d70684483e5017","reference_id":"","reference_type":"","scores":[{"value":"6.1","scoring_system":"cvssv3.1","scoring_elements":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"},{"value":"MODERATE","scoring_system":"generic_textual","scoring_elements":""}],"url":"https://github.com/ViewComponent/view_component/commit/0d26944a8d2730ea40e60eae23d70684483e5017"},{"reference_url":"https://github.com/ViewComponent/view_component/commit/c43d8bafa7117cbce479669a423ab266de150697","reference_id":"","reference_type":"","scores":[{"value":"6.1","scoring_system":"cvssv3.1","scoring_elements":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"},{"value":"MODERATE","scoring_system":"generic_textual","scoring_elements":""}],"url":"https://github.com/ViewComponent/view_component/commit/c43d8bafa7117cbce479669a423ab266de150697"},{"reference_url":"https://github.com/ViewComponent/view_component/pull/1950","reference_id":"","reference_type":"","scores":[{"value":"6.1","scoring_system":"cvssv3.1","scoring_elements":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"},{"value":"MODERATE","scoring_system":"generic_textual","scoring_elements":""}],"url":"https://github.com/ViewComponent/view_component/pull/1950"},{"reference_url":"https://github.com/ViewComponent/view_component/pull/1962","reference_id":"","reference_type":"","scores":[{"value":"6.1","scoring_system":"cvssv3.1","scoring_elements":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"},{"value":"MODERATE","scoring_system":"generic_textual","scoring_elements":""}],"url":"https://github.com/ViewComponent/view_component/pull/1962"},{"reference_url":"https://nvd.nist.gov/vuln/detail/CVE-2024-21636","reference_id":"CVE-2024-21636","reference_type":"","scores":[{"value":"6.1","scoring_system":"cvssv3.1","scoring_elements":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"},{"value":"MODERATE","scoring_system":"generic_textual","scoring_elements":""}],"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-21636"},{"reference_url":"https://github.com/advisories/GHSA-wf2x-8w6j-qw37","reference_id":"GHSA-wf2x-8w6j-qw37","reference_type":"","scores":[],"url":"https://github.com/advisories/GHSA-wf2x-8w6j-qw37"},{"reference_url":"https://github.com/ViewComponent/view_component/security/advisories/GHSA-wf2x-8w6j-qw37","reference_id":"GHSA-wf2x-8w6j-qw37","reference_type":"","scores":[{"value":"6.1","scoring_system":"cvssv3","scoring_elements":""},{"value":"6.1","scoring_system":"cvssv3.1","scoring_elements":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"},{"value":"MODERATE","scoring_system":"generic_textual","scoring_elements":""}],"url":"https://github.com/ViewComponent/view_component/security/advisories/GHSA-wf2x-8w6j-qw37"}],"fixed_packages":[{"url":"http://public2.vulnerablecode.io/api/packages/107333?format=json","purl":"pkg:gem/view_component@2.83.0","is_vulnerable":false,"affected_by_vulnerabilities":[],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:gem/view_component@2.83.0"},{"url":"http://public2.vulnerablecode.io/api/packages/68417?format=json","purl":"pkg:gem/view_component@3.9.0","is_vulnerable":false,"affected_by_vulnerabilities":[],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:gem/view_component@3.9.0"}],"aliases":["CVE-2024-21636","GHSA-wf2x-8w6j-qw37"],"risk_score":3.1,"exploitability":"0.5","weighted_severity":"6.2","resource_url":"http://public2.vulnerablecode.io/vulnerabilities/VCID-fk74-z1fr-1uem"},{"url":"http://public2.vulnerablecode.io/api/vulnerabilities/42550?format=json","vulnerability_id":"VCID-ga2g-htdr-7ken","summary":"Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')\nVIewComponent 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.","references":[{"reference_url":"https://api.first.org/data/v1/epss?cve=CVE-2022-24722","reference_id":"","reference_type":"","scores":[{"value":"0.00735","scoring_system":"epss","scoring_elements":"0.73173","published_at":"2026-06-04T12:55:00Z"}],"url":"https://api.first.org/data/v1/epss?cve=CVE-2022-24722"},{"reference_url":"https://github.com/github/view_component","reference_id":"","reference_type":"","scores":[{"value":"8.1","scoring_system":"cvssv3.1","scoring_elements":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N"},{"value":"HIGH","scoring_system":"generic_textual","scoring_elements":""}],"url":"https://github.com/github/view_component"},{"reference_url":"https://github.com/github/view_component/commit/3f82a6e62578ff6f361aba24a1feb2caccf83ff9","reference_id":"","reference_type":"","scores":[{"value":"8.1","scoring_system":"cvssv3.1","scoring_elements":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N"},{"value":"HIGH","scoring_system":"generic_textual","scoring_elements":""}],"url":"https://github.com/github/view_component/commit/3f82a6e62578ff6f361aba24a1feb2caccf83ff9"},{"reference_url":"https://github.com/github/view_component/releases/tag/v2.31.2","reference_id":"","reference_type":"","scores":[{"value":"8.1","scoring_system":"cvssv3.1","scoring_elements":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N"},{"value":"HIGH","scoring_system":"generic_textual","scoring_elements":""}],"url":"https://github.com/github/view_component/releases/tag/v2.31.2"},{"reference_url":"https://github.com/github/view_component/releases/tag/v2.49.1","reference_id":"","reference_type":"","scores":[{"value":"8.1","scoring_system":"cvssv3.1","scoring_elements":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N"},{"value":"HIGH","scoring_system":"generic_textual","scoring_elements":""}],"url":"https://github.com/github/view_component/releases/tag/v2.49.1"},{"reference_url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/view_component/CVE-2022-24722.yml","reference_id":"","reference_type":"","scores":[{"value":"8.1","scoring_system":"cvssv3.1","scoring_elements":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N"},{"value":"HIGH","scoring_system":"generic_textual","scoring_elements":""}],"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/view_component/CVE-2022-24722.yml"},{"reference_url":"https://nvd.nist.gov/vuln/detail/CVE-2022-24722","reference_id":"","reference_type":"","scores":[{"value":"8.1","scoring_system":"cvssv3.1","scoring_elements":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N"},{"value":"HIGH","scoring_system":"generic_textual","scoring_elements":""}],"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-24722"},{"reference_url":"https://github.com/advisories/GHSA-cm9w-c4rj-r2cf","reference_id":"GHSA-cm9w-c4rj-r2cf","reference_type":"","scores":[],"url":"https://github.com/advisories/GHSA-cm9w-c4rj-r2cf"},{"reference_url":"https://github.com/github/view_component/security/advisories/GHSA-cm9w-c4rj-r2cf","reference_id":"GHSA-cm9w-c4rj-r2cf","reference_type":"","scores":[{"value":"8.1","scoring_system":"cvssv3","scoring_elements":""},{"value":"8.1","scoring_system":"cvssv3.1","scoring_elements":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N"},{"value":"HIGH","scoring_system":"generic_textual","scoring_elements":""}],"url":"https://github.com/github/view_component/security/advisories/GHSA-cm9w-c4rj-r2cf"}],"fixed_packages":[{"url":"http://public2.vulnerablecode.io/api/packages/60840?format=json","purl":"pkg:gem/view_component@2.31.2","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-fk74-z1fr-1uem"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:gem/view_component@2.31.2"},{"url":"http://public2.vulnerablecode.io/api/packages/60841?format=json","purl":"pkg:gem/view_component@2.49.1","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-fk74-z1fr-1uem"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:gem/view_component@2.49.1"}],"aliases":["CVE-2022-24722","GHSA-cm9w-c4rj-r2cf"],"risk_score":4.0,"exploitability":"0.5","weighted_severity":"8.0","resource_url":"http://public2.vulnerablecode.io/vulnerabilities/VCID-ga2g-htdr-7ken"}],"fixing_vulnerabilities":[],"risk_score":"4.0","resource_url":"http://public2.vulnerablecode.io/packages/pkg:gem/view_component@2.25.0"}