Advisory

GHSA-ghjv-mh6x-7q6h

Also known as: CVE-2024-22191

Summary

avo vulnerable to stored cross-site scripting (XSS) in key_value field

Details

Summary
A stored cross-site scripting (XSS) vulnerability was found in the key_value field of Avo v3.2.3. This vulnerability could allow an attacker to execute arbitrary JavaScript code in the victim's browser.

Details
The value of the key_value is inserted directly into the HTML code. In the current version of Avo (possibly also older versions), the value is not properly sanitized before it is inserted into the HTML code.

This vulnerability can be exploited by an attacker to inject malicious JavaScript code into the key_value field. When a victim views the page containing the malicious code, the code will be executed in their browser.

In [avo/fields/common/key_value_component.html.erb]( https://github.com/avo-hq/avo/blob/main/app/components/avo/fields/common/key_value_component.html.erb#L38C21-L38C33) the value is taken in lines 38 and 49 and seems to be interpreted directly as html in lines 44 and 55.

PoC

POC

To reproduce the vulnerability, follow these steps:

  1. Edit an entry with a key_value field.
  2. Enter the following payload into the value field:
3. Save the entry.
4. Go to the index page and click on the eye icon next to the entry.

The malicious JavaScript code will be executed and an alert box will be displayed. 
_On the show and edit page the alert seems not to pop up, but the strong tag breaks out of the expected html tag_

### Impact
This vulnerability could be used to steal sensitive information from victims that could be used to hijack victims' accounts or redirect them to malicious websites.

Severity

High Basis: The source's own band: HIGH

Dates

Published
2024-01-16 15:24 UTC
Modified
2026-09-10 03:50 UTC

Affected packages and fixes

avo

RubyGems · All systems

Affected

  • introduced 3.0.0.beta1, fixed 3.2.4 (ecosystem)

Fixed versions

3.2.4

Fix

The export has no generic command for this ecosystem.

avo

RubyGems · All systems

Affected

  • introduced 0, fixed 2.47.0 (ecosystem)

Fixed versions

2.47.0

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