Loading...
Skip to main content

CVE-2022-24722 — Vulnerability in view_component — CVE Details

HIGH

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in view_component

Published March 2, 2022Updated February 16, 2024Source: osv

Summary

This is an XSS 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.29.1 and 2.49.1 have been released and fully mitigate the vulnerability. Avoid passing user input to the `translate` function, or sanitize the inputs before passing them. ### For more information If you have any questions or comments about this advisory: * Open an issue in the [github/view_component](http://github.com/github/view_component) project

Advisory Timeline

  • First published March 2, 2022 (1684 days ago).
  • Last revised February 16, 2024 — 715 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Bundler
Update view_component to 2.49.1 or later
gem install view_component -v 2.49.1
Bundler
Update view_component to 2.31.2 or later
gem install view_component -v 2.31.2

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (2)

Affects 1 ecosystem: rubygems (1).

PackageEcosystemAffectedFixed In
view_component
rubygems
2.32.0, 2.33.0, 2.34.0, 2.35.0 (+15 more)2.49.1
view_component
rubygems
2.31.0, 2.31.12.31.2

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-79
    Cross-site Scripting (XSS)MITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 8.1 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N

Frequently Asked Questions

What is CVE-2022-24722?
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in view_component This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.1/10).
How do I check if my project is affected by CVE-2022-24722?
CVE-2022-24722 affects view_component. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2022-24722 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
8.1

High exploitability or significant impact. Prioritize remediation within days.

Also Known As

GHSA-cm9w-c4rj-r2cf

Related CVEs

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies