CVE-2024-21636
CVE-2024-21636 is a medium-severity vulnerability in Viewcomponent View Component with a CVSS 3.x base score of 6.1. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-79.
Key facts
- Severity: Medium (CVSS 3.x base score 6.1)
- EPSS exploit prediction: 0% (40th percentile)
- Actively exploited: Not listed in CISA KEV
- EU (EUVD) id: EUVD-2024-0446
- Weakness: CWE-79
- Affected product: Viewcomponent View Component
- Published:
- Last modified:
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`.
Frequently asked questions
- What is CVE-2024-21636?
- 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`.
- How severe is CVE-2024-21636?
- CVE-2024-21636 has a CVSS 3.x base score of 6.1, rated medium severity. It is exploitable over network with low attack complexity, requires no privileges and user interaction. Impact on confidentiality is low, integrity low, and availability none.
- Is CVE-2024-21636 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 0% (40th percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2024-21636?
- CVE-2024-21636 affects Viewcomponent View Component. See the affected-products list for the exact vulnerable versions.
- How do I fix CVE-2024-21636?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround.
- Does CVE-2024-21636 have an EU (EUVD) identifier?
- Yes. CVE-2024-21636 is tracked in the ENISA EU Vulnerability Database (EUVD) as EUVD-2024-0446.
- When was CVE-2024-21636 published?
- CVE-2024-21636 was published on 2024-01-04 and last updated on 2026-06-17.
References
- https://github.com/ViewComponent/view_component/commit/0d26944a8d2730ea40e60eae23d70684483e5017
- https://github.com/ViewComponent/view_component/commit/c43d8bafa7117cbce479669a423ab266de150697
- https://github.com/ViewComponent/view_component/pull/1950
- https://github.com/ViewComponent/view_component/pull/1962
- https://github.com/ViewComponent/view_component/security/advisories/GHSA-wf2x-8w6j-qw37
Affected products (1)
- cpe:2.3:a:viewcomponent:view_component:*:*:*:*:*:ruby:*:*
More vulnerabilities in Viewcomponent View Component
- CVE-2026-54498 — High (CVSS 8.7): view_component is a framework for building reusable, testable, and encapsulated view components in Ruby on Rails. From…
- CVE-2026-54497 — Medium (CVSS 6.8): view_component is a framework for building reusable, testable, and encapsulated view components in Ruby on Rails. From…
- CVE-2026-44837 — Medium (CVSS 5.9): view_component is a framework for building reusable, testable, and encapsulated view components in Ruby on Rails. From…
All CVEs affecting Viewcomponent View Component →
Other CWE-79 (Cross-site Scripting (XSS)) vulnerabilities
- CVE-2026-106102 — Critical (CVSS 10.0): Quasar Framework is a framework for building high-performance Vue.js user interfaces. Prior to 2.22.0, the SSR-only…
- CVE-2026-59167 — Critical (CVSS 10.0): SunEditor is a lightweight and powerful WYSIWYG editor in vanilla JavaScript with no dependencies. Prior to 2.47.11,…
- CVE-2026-85061 — Critical (CVSS 10.0): MapLibre GL JS is an interactive vector tile map library for web browsers. Prior to 6.4.1, DOM.sanitize() in…
- CVE-2025-49410 — Critical (CVSS 10.0): Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') vulnerability in Imran Emu TC…
- CVE-2024-47875 — Critical (CVSS 10.0): DOMPurify is a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG. DOMpurify was vulnerable to…
- CVE-2024-6886 — Critical (CVSS 10.0): Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') vulnerability in Gitea…
Browse all CWE-79 (Cross-site Scripting (XSS)) vulnerabilities →