Incorrect Behavior Order: Validate Before Canonicalize Affecting vite package, versions >=6.4.4 <6.4.5


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.3% (23rd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-VITE-21802694
  • published29 Oct 2026
  • disclosed28 Oct 2026
  • creditHama1cco

Introduced: 28 Oct 2026

NewCVE-2026-118662  (opens in a new tab)
CWE-180  (opens in a new tab)

How to fix?

Upgrade vite to version 6.4.5 or higher.

Overview

vite is a Native-ESM powered web dev build tool

Affected versions of this package are vulnerable to Incorrect Behavior Order: Validate Before Canonicalize via isServerAccessDeniedForTransform in packages/vite/src/node/server/middlewares/transform.ts, where the server.fs access control check is performed on the raw module ID without first stripping the query string. An attacker can append a query string (e.g. ?raw, ?url, ?inline, or ?url.svg) to a file path that would otherwise be blocked by server.fs restrictions, causing the access check to evaluate the unstripped ID and incorrectly permit access to files outside the configured allowed directories. This allows an unauthenticated remote attacker to read the contents of sensitive files that should be restricted.

CVSS Base Scores

version 4.0
version 3.1