Lucene search

K
osvGoogleOSV:GHSA-GHJV-MH6X-7Q6H
HistoryJan 16, 2024 - 3:24 p.m.

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

2024-01-1615:24:00
Google
osv.dev
7
cross-site scripting
html injection
javascript execution
information theft

7.3 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

LOW

User Interaction

REQUIRED

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

NONE

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

5.5 Medium

AI Score

Confidence

High

0.001 Low

EPSS

Percentile

20.2%

Summary

A stored cross-site scripting (XSS) vulnerability was found in thekey_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 the value is taken in lines 38 and49and seems to be interpreted directly as html in lines44and55.

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:
    POC\"&gt; &lt;script&gt;alert( 'XSS in key_value' );&lt;/script&gt; <strong>Outside-tag&lt;/strong
  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.

7.3 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

LOW

User Interaction

REQUIRED

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

NONE

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

5.5 Medium

AI Score

Confidence

High

0.001 Low

EPSS

Percentile

20.2%

Related for OSV:GHSA-GHJV-MH6X-7Q6H