- Description
- view_component is a framework for building reusable, testable, and encapsulated view components in Ruby on Rails. Versions prior to 3.9.0 and 2.83.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 and 2.83.0 have been released and fully mitigate both the `#call` and the `#output_postamble` vulnerabilities. As a workaround, sanitize the return value of `#call`.
- Source
- security-advisories@github.com
- NVD status
- Modified
CVSS 3.1
- Type
- Primary
- Base score
- 6.1
- Impact score
- 2.7
- Exploitability score
- 2.8
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- Severity
- MEDIUM
- security-advisories@github.com
- CWE-79
- Hype score
- Not currently trending
[ { "nodes": [ { "negate": false, "cpeMatch": [ { "criteria": "cpe:2.3:a:viewcomponent:view_component:*:*:*:*:*:ruby:*:*", "vulnerable": true, "matchCriteriaId": "7E014569-73E5-4B59-8BC9-4EE2E2EE7F8E", "versionEndExcluding": "2.83.0" }, { "criteria": "cpe:2.3:a:viewcomponent:view_component:*:*:*:*:*:ruby:*:*", "vulnerable": true, "matchCriteriaId": "A7D836B9-1CF7-4AEA-9FC7-BA0EEFDE3465", "versionEndExcluding": "3.9.0", "versionStartIncluding": "3.0.0" } ], "operator": "OR" } ] } ]