Miggo Logo

CVE-2024-34344:
Nuxt vulnerable to remote code execution via the browser when running the test locally

8.8

CVSS Score
3.1

Basic Information

EPSS Score
0.49496%
Published
8/5/2024
Updated
11/18/2024
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
nuxtnpm>= 3.4.0, < 3.12.43.12.4

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from two key points in test-component-wrapper.ts: 1) The path validation checks the resolved filesystem path against devRootDir, but 2) the actual component import uses the original query.path parameter. This allows attackers to provide a data: URI that passes the filesystem path check (as resolve() treats it as relative path) while being interpreted as absolute URI by import(). The dynamic import() call with unverified user input enables arbitrary code execution via specially crafted paths.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Summ*ry *u* to t** insu**i*i*nt v*li**tion o* t** `p*t*` p*r*m*t*r in t** NuxtT*st*ompon*ntWr*pp*r, *n *tt**k*r **n *x**ut* *r*itr*ry J*v*S*ript on t** s*rv*r si**, w*i** *llows t**m to *x**ut* *r*itr*ry *omm*n*s. ### **t*ils W*il* runnin* t** t

Reasoning

T** vuln*r**ility st*ms *rom two k*y points in t*st-*ompon*nt-wr*pp*r.ts: *) T** p*t* v*li**tion ****ks t** r*solv** *il*syst*m p*t* ***inst **vRoot*ir, *ut *) t** **tu*l *ompon*nt import us*s t** ori*in*l qu*ry.p*t* p*r*m*t*r. T*is *llows *tt**k*rs