CVE-2024-21636view_component Cross-site Scripting vulnerability
- 6.1MediumCVSS base score
- 0.50%Exploitation in 30 daysEPSS · top 57% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
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`.
Timeline
ID reserved
By GitHub_M
- 6 days later
· 6 days later
Published
- 18 months later
· 18 months later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | Medium6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVDNVD · Modified | 3.1 | Medium6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
- EPSS (exploitation in 30 days)
- 0.50% · top 57% of all CVEs (16 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: no · Technical impact: partial
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 6.1.
Affected products
ViewComponent · view_component
- affected >= 3.0.0, < 3.9.0
- affected < 2.83.0
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- RubyGemsview_componentGHSA-wf2x-8w6j-qw37 (opens in a new tab)
References
References5
- https://github.com/ViewComponent/view_component/security/advisories/GHSA-wf2x-8w6j-qw37 (opens in a new tab)x_refsource_CONFIRMx_transferred
- https://github.com/ViewComponent/view_component/pull/1950 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/ViewComponent/view_component/pull/1962 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/ViewComponent/view_component/commit/0d26944a8d2730ea40e60eae23d70684483e5017 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/ViewComponent/view_component/commit/c43d8bafa7117cbce479669a423ab266de150697 (opens in a new tab)x_refsource_MISCx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2024-0446 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-wf2x-8w6j-qw37 (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2024-21636)Record last updated .