Advisory

GHSA-ch3h-j2vf-95pv

Also known as: CVE-2022-27777

Summary

XSS Vulnerability in Action View tag helpers

Details

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.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2022-04-27 22:32 UTC
Modified
2024-02-16 08:19 UTC

Affected packages and fixes

actionview

RubyGems · All systems

Affected

  • introduced 0, fixed 5.2.7.1 (ecosystem)

Fixed versions

5.2.7.1

Fix

The export has no generic command for this ecosystem.

actionview

RubyGems · All systems

Affected

  • introduced 6.0.0, fixed 6.0.4.8 (ecosystem)

Fixed versions

6.0.4.8

Fix

The export has no generic command for this ecosystem.

actionview

RubyGems · All systems

Affected

  • introduced 6.1.0, fixed 6.1.5.1 (ecosystem)

Fixed versions

6.1.5.1

Fix

The export has no generic command for this ecosystem.

actionview

RubyGems · All systems

Affected

  • introduced 7.0.0, fixed 7.0.2.4 (ecosystem)

Fixed versions

7.0.2.4

Fix

The export has no generic command for this ecosystem.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences