Miggo Logo

CVE-2024-22191: avo vulnerable to stored cross-site scripting (XSS) in key_value field

7.3

CVSS Score
3.1

Basic Information

EPSS Score
0.75496%
Published
1/16/2024
Updated
1/18/2024
KEV Status
No
Technology
TechnologyRuby

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
avorubygems>= 3.0.0.beta1, <= 3.2.33.2.4
avorubygems<= 2.46.02.47.0

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from unescaped HTML insertion in the key_value field rendering. The commit diff shows the fix added DOMPurify sanitization to the key/value parameters passed to interpolatedRow. Before the patch, the function directly used raw user input to build HTML via string interpolation (lines 38-49 in key_value_component.html.erb references), which were then injected into DOM via innerHTML in the controller. The JavaScript controller's row generation was the injection point rather than the ERB templates themselves, as the XSS execution context is client-side DOM manipulation.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

### Summ*ry * **stor** *ross-sit* s*riptin* (XSS)** vuln*r**ility w*s *oun* in t** **k*y_v*lu*** *i*l* o* *vo v*.*.*. T*is vuln*r**ility *oul* *llow *n *tt**k*r to *x**ut* *r*itr*ry J*v*S*ript *o** in t** vi*tim's *rows*r. ### **t*ils T** v*lu* o* t

Reasoning

T** vuln*r**ility st*ms *rom un*s**p** *TML ins*rtion in t** k*y_v*lu* *i*l* r*n**rin*. T** *ommit *i** s*ows t** *ix ***** *OMPuri*y s*nitiz*tion to t** k*y/v*lu* p*r*m*t*rs p*ss** to int*rpol*t**Row. ***or* t** p*t**, t** *un*tion *ir**tly us** r*w