Miggo Logo

CVE-2023-51447: Cross-site scripting (XSS) in the dynamic file uploads

6.3

CVSS Score
3.1

Basic Information

EPSS Score
0.5737%
Published
2/20/2024
Updated
2/20/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:L/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
decidimrubygems>= 0.27.0, < 0.27.50.27.5
decidim-corerubygems>= 0.27.0, < 0.27.50.27.5

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stemmed from multiple functions displaying user-controlled filenames without proper HTML escaping. The patch adds escaping in: 1) Ruby cell methods handling filename truncation/display 2) JavaScript upload handlers inserting filenames into DOM elements. The commit diffs show vulnerable functions were directly handling filename presentation without escaping, while tests verify XSS prevention through escaping. The functions listed were clearly modified in the security patch to add escaping utilities like decidim_html_escape and escapeHtml, confirming their role in the vulnerability.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Imp**t T** *yn*mi* *il* uplo** ***tur* is su*j**t to pot*nti*l XSS *tt*** in **s* t** *tt**k*r m*n***s to mo*i*y t** *il* n*m*s o* t** r**or*s **in* uplo**** to t** s*rv*r. T*is *pp**rs in s**tions w**r* t** us*r *ontrols t** *il* uplo** *i*lo*s

Reasoning

T** vuln*r**ility st*mm** *rom multipl* *un*tions *ispl*yin* us*r-*ontroll** *il*n*m*s wit*out prop*r *TML *s**pin*. T** p*t** ***s *s**pin* in: *) Ru*y **ll m*t*o*s **n*lin* *il*n*m* trun**tion/*ispl*y *) J*v*S*ript uplo** **n*l*rs ins*rtin* *il*n*m