CVE-2022-24722: Cross-site Scripting in view_component
Vulnerability summary
CVE-2022-24722 is a high (CVSS 8.1) vulnerability in github view_component. EPSS estimates a 1.09% chance of exploitation in the next 30 days, higher than 66.5% of scored vulnerabilities.
Not severe (CVSS 8.1, network access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Timeline
- 02-03-2022PublishedVulnerability first disclosed.
- 23-04-2025Last modifiedVulnerability information updated.
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 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.
CVSS metrics
4 scores · 3 sources · 2 versions- OSV · RubygemsEcosystem advisory · calculated8.1HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
- NVDNIST6.1MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:NDiffers
EPSS trend
Probability
1.09%
Chance of exploitation in the next 30 days
Percentile
67%
Versus all other CVEs
30-day change
No change 0.00 pp
From 1.09% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, user interaction (CVSS vector). Other conditions: not stated in public data.
Github2 products
- view_component≥ 2.31.0, < 2.31.2 | ≥ 2.32.0, < 2.49.1
- viewcomponent≥ 2.31.0, < 2.31.2 | ≥ 2.32.0, < 2.49.1
RubyGems1 product
- view_component≥ 2.31.0, < 2.31.2 | ≥ 2.32.0, < 2.49.1
2 vendors · 3 products
References
7 links- github.com/github/view_component/security/advisories/GHSA-cm9w-c4rj-r2cfX Refsource CONFIRMWEBThird Party Advisory
- github.com/github/view_component/commit/3f82a6e62578ff6f361aba24a1feb2caccf83ff9X Refsource MISCWEBPatchThird Party Advisory