Loading...
Skip to main content

CVE-2022-27777

MEDIUM

XSS Vulnerability in Action View tag helpers

Published April 27, 2022Updated February 16, 2024Source: osv

Summary

There is a possible XSS vulnerability in Action View tag helpers. Passing untrusted input as hash keys can lead to a possible XSS vulnerability. This vulnerability has been assigned the CVE identifier CVE-2022-27777. Versions Affected: ALL Not affected: NONE Fixed Versions: 7.0.2.4, 6.1.5.1, 6.0.4.8, 5.2.7.1 ## Impact If untrusted data is passed as the hash key for tag attributes, there is a possibility that the untrusted data may not be properly escaped which can lead to an XSS vulnerability. Impacted code will look something like this: ``` check_box_tag('thename', 'thevalue', false, aria: { malicious_input => 'thevalueofaria' }) ``` Where the "malicious_input" variable contains untrusted data. All users running an affected release should either upgrade or use one of the workarounds immediately. ## Releases The FIXED releases are available at the normal locations. ## Workarounds Escape the untrusted data before using it as a key for tag helper methods.

Remediation

Upgrade to the fixed version using your package manager.

Bundler
Update actionview to 5.2.7.1 or later
gem install actionview -v 5.2.7.1
Bundler
Update actionview to 7.0.2.4 or later
gem install actionview -v 7.0.2.4
Bundler
Update actionview to 6.0.4.8 or later
gem install actionview -v 6.0.4.8
Bundler
Update actionview to 6.1.5.1 or later
gem install actionview -v 6.1.5.1

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

Affected Packages (4)

PackageEcosystemAffectedFixed In
actionview
rubygems
4.1.0, 4.1.0.beta1, 4.1.0.beta2, 4.1.0.rc1 (+148 more)5.2.7.1
actionview
rubygems
7.0.0, 7.0.1, 7.0.2, 7.0.2.1 (+2 more)7.0.2.4
actionview
rubygems
6.0.0, 6.0.1, 6.0.1.rc1, 6.0.2 (+21 more)6.0.4.8
actionview
rubygems
6.1.0, 6.1.1, 6.1.2, 6.1.2.1 (+12 more)6.1.5.1

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) 6.1 score means for each attack dimension.

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

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

Frequently Asked Questions

What is CVE-2022-27777?
XSS Vulnerability in Action View tag helpers This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 6.1/10).
How do I check if my project is affected by CVE-2022-27777?
CVE-2022-27777 affects actionview. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2022-27777 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
6.1

Exploitation requires specific conditions or has limited impact. Remediate within weeks.

Also Known As

GHSA-ch3h-j2vf-95pv

Related CVEs

Check if you're affected

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

Scan Your Dependencies