Miggo Logo

CVE-2025-31125: Vite has a `server.fs.deny` bypassed for `inline` and `raw` with `?import` query

5.3

CVSS Score
3.1

Basic Information

EPSS Score
0.92994%
Published
3/31/2025
Updated
3/31/2025
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
vitenpm>= 6.2.0, < 6.2.46.2.4
vitenpm>= 6.1.0, < 6.1.36.1.3
vitenpm>= 6.0.0, < 6.0.136.0.13
vitenpm>= 5.0.0, < 5.4.165.4.16
vitenpm< 4.5.114.5.11

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from incomplete query parameter validation in transformMiddleware. The patch shows:

  1. Addition of inlineRE regex pattern for 'inline' query param
  2. Expansion of the security check condition to include inlineRE.test()
  3. This indicates the original vulnerability allowed requests with ?inline/raw?import to bypass ensureServingAccess checks
  4. transformMiddleware is the primary request processing function that would appear in profiler when handling malicious URLs
  5. The function signature matches the middleware pattern shown in the patch diff where security checks are applied

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Summ*ry T** *ont*nts o* *r*itr*ry *il*s **n ** r*turn** to t** *rows*r. ### Imp**t Only *pps *xpli*itly *xposin* t** Vit* **v s*rv*r to t** n*twork (usin* `--*ost` or [`s*rv*r.*ost` *on*i* option](*ttps://vit*js.**v/*on*i*/s*rv*r-options.*tml#s

Reasoning

T** vuln*r**ility st*ms *rom in*ompl*t* qu*ry p*r*m*t*r v*li**tion in tr*ns*ormMi**l*w*r*. T** p*t** s*ows: *. ***ition o* inlin*R* r***x p*tt*rn *or 'inlin*' qu*ry p*r*m *. *xp*nsion o* t** s**urity ****k *on*ition to in*lu** inlin*R*.t*st() *. T*is