CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-118662

CVE-2026-118662: Access Control Bypass via Uncanonicalized Query Parameters in Vite Development Server

Alon Barad
Alon Barad
Software Engineer

Oct 29, 2026·11 min read·4 visits

Executive Summary (TL;DR)

Vite 6.4.4 evaluates `server.fs.deny` file access restrictions before stripping URL query parameters in its transform middleware. Unauthenticated attackers with network access to an exposed Vite development server can append query parameters like `?raw` or `?import&raw` to bypass the denylist and read sensitive files such as `.env` located within allowed project directories. Upgrading to Vite 6.4.5 resolves the issue.

CVE-2026-118662 (also tracked as GHSA-8g5g-mxqh-grgj) is an improper access control and path canonicalization vulnerability in the Vite frontend build and development tool. In version 6.4.4, the Vite development server fails to strip transform and loader query parameters before evaluating file paths against the `server.fs.deny` configuration directive. When the development server is exposed to a network and sensitive files located within `server.fs.allow` match patterns in `server.fs.deny`, an unauthenticated remote attacker can bypass file access restrictions by appending specific query strings such as `?raw` or `?inline` to HTTP requests. This allows arbitrary retrieval of restricted files, including environment configuration files and private cryptographic keys.

Vulnerability Overview

Vite (vitejs/vite) is a widely deployed build tool and development server for modern JavaScript and TypeScript web applications. During local development, Vite runs an HTTP server that intercepts browser module requests, applies on-demand code transformations, and serves source files directly from the host filesystem. Because serving arbitrary files from a developer workstation or build container presents security risks, Vite implements a two-tiered filesystem access control mechanism governed by the server.fs.allow and server.fs.deny configuration properties.

By default, server.fs.allow permits the development server to serve files located within the project workspace root, while server.fs.deny explicitly restricts access to sensitive files that frequently coexist within the workspace. The default denylist blocks access to environment files (**/.env, **/.env.*), private certificates (*.{crt,pem}), and version control metadata (**/.git/**). Even if a file resides inside an allowed directory, any match against server.fs.deny is intended to terminate the request with an HTTP 403 Forbidden response.

CVE-2026-118662 is a validation-before-canonicalization vulnerability (CWE-180) resulting in improper access control (CWE-284) within Vite's transformation middleware (packages/vite/src/node/server/middlewares/transform.ts). In Vite version 6.4.4, the helper function responsible for verifying filesystem access permissions during module transformations evaluates the target module identifier before stripping URL query parameters. When an HTTP request includes Vite-specific loader queries—such as ?raw, ?url, or ?inline—the un-sanitized identifier is passed directly to the glob-matching engine.

Because glob rules like **/.env expect a clean filename boundary at the end of the string, the presence of a trailing query string causes the denylist pattern match to fail. The access check erroneously concludes that the file is not restricted, and the subsequent loader logic strips the query parameter to read the actual file from disk. If the Vite development server is bound to a network interface via --host or equivalent configuration, an unauthenticated attacker on the network can exploit this discrepancy to read sensitive configuration files and credentials.

Root Cause Analysis

To understand the root cause of CVE-2026-118662, it is necessary to examine how Vite processes incoming HTTP requests for static and transformed assets. When a browser or HTTP client requests a module from the Vite development server, the request passes through a series of Connect-based middleware handlers. One of the primary handlers is the transform middleware, which resolves module identifiers, loads file contents from disk, and runs plugin transform pipelines.

Vite supports specialized resource import queries that instruct the build tool on how to load a specific asset. These queries are matched in packages/vite/src/node/server/middlewares/transform.ts using regular expressions: rawRE matches ?raw (loads the file content as a raw string export), urlRE matches ?url (returns the asset's resolved URL), inlineRE matches ?inline (inlines the asset as base64 or data URI), and svgRE matches .svg files that may undergo transformation. When any of these patterns match the requested module identifier id, the middleware invokes isServerAccessDeniedForTransform(id) to verify whether the file is permitted to be served.

The core defect in Vite 6.4.4 lies in the ordering of canonicalization and validation inside isServerAccessDeniedForTransform. The function receives the raw module identifier id, which retains its query string components (for example, /app/.env?raw or /app/src/deny/secret.txt?import&raw). In the vulnerable implementation, isServerAccessDeniedForTransform passes id directly to checkLoadingAccess(config, id) without calling Vite's internal cleanUrl() utility to strip query parameters and hash fragments.

Inside checkLoadingAccess, Vite checks whether the requested path matches any picomatch glob pattern defined in config.server.fs.deny, and subsequently checks whether the path resides within the directory hierarchy allowed by config.server.fs.allow. When evaluating a denylist pattern such as **/.env or **/deny/** against a path ending with ?raw, the glob matcher treats ?raw as part of the filename itself. For exact filename globs (like **/.env) or extension-based globs (like *.{crt,pem}), the trailing query characters prevent a match. Meanwhile, the directory allowlist check evaluates whether the file resides inside the workspace root directory; because /app/.env?raw is still lexically child to /app/, the server.fs.allow check succeeds. Consequently, checkLoadingAccess returns 'allowed', and the transform pipeline proceeds to strip the query parameters during the actual disk read phase, serving the restricted file contents to the requester.

Code Analysis

The vulnerability and its corresponding fix are localized within packages/vite/src/node/server/middlewares/transform.ts. In Vite 6.4.4, the isServerAccessDeniedForTransform function was implemented to gate access to assets requested with transform query suffixes.

// Vulnerable implementation in Vite 6.4.4
// File: packages/vite/src/node/server/middlewares/transform.ts
export function isServerAccessDeniedForTransform(
  config: ResolvedConfig,
  id: string,
): boolean {
  if (rawRE.test(id) || urlRE.test(id) || inlineRE.test(id) || svgRE.test(id)) {
    // FLAW: 'id' contains the query string (e.g., '/path/to/.env?raw').
    // Denylist patterns in config.server.fs.deny fail to match the uncleaned path.
    return checkLoadingAccess(config, id) !== 'allowed'
  }
  return false
}

Notice the paradoxical condition in the vulnerable code: the if statement specifically enters the validation block because id matched a query parameter regular expression (rawRE, urlRE, or inlineRE), or svgRE. Thus, for three out of the four trigger conditions, id is guaranteed to contain a query string at the exact moment checkLoadingAccess(config, id) is called.

In commit 91e40d7bf9777057bbd31c3eb036a54c9465697e (released in Vite 6.4.5), the maintainers modified isServerAccessDeniedForTransform to canonicalize the identifier via cleanUrl(id) prior to checking loading access, while retaining the check against the raw id as well:

--- a/packages/vite/src/node/server/middlewares/transform.ts
+++ b/packages/vite/src/node/server/middlewares/transform.ts
@@ -58,7 +58,10 @@ export function isServerAccessDeniedForTransform(
   id: string,
 ): boolean {
   if (rawRE.test(id) || urlRE.test(id) || inlineRE.test(id) || svgRE.test(id)) {
-    return checkLoadingAccess(config, id) !== 'allowed'
+    return (
+      checkLoadingAccess(config, cleanUrl(id)) !== 'allowed' ||
+      checkLoadingAccess(config, id) !== 'allowed'
+    )
   }
   return false
 }

The cleanUrl helper function (defined in Vite's shared utilities using const postfixRE = /[?#].*$/ to replace everything from the first ? or # onward with an empty string) strips all query parameters and URL fragments. By evaluating checkLoadingAccess(config, cleanUrl(id)) !== 'allowed', an input such as /project/.env?import&raw is normalized to /project/.env before being tested against server.fs.deny.

Retaining both cleanUrl(id) and the uncleaned id check in a logical OR (||) statement provides completeness against variant bypasses. If a custom server.fs.deny rule targets specific query patterns or if a crafted filename literally contains a question mark on filesystems that permit it, evaluating both the stripped and unstripped representations ensures that if either representation violates the access policy, access is denied. Additionally, the upstream patch expanded the regression test suite in playground/fs-serve/__tests__/deny/fs-serve-deny.spec.ts and playground/fs-serve/__tests__/commonTests.ts to verify that single and compound query suffixes (such as ?.svg?import and ?.svg?.wasm?init) consistently return HTTP 403 Forbidden.

Exploitation

Exploiting CVE-2026-118662 requires no authentication or specialized tooling; it can be executed using standard HTTP clients such as curl or a web browser. However, two architectural prerequisites must be satisfied for an application to be vulnerable to remote exploitation.

First, the Vite development server must be reachable by the attacker over the network. By default, Vite binds only to the local loopback interface (localhost / 127.0.0.1). For a remote attacker to reach the service, the developer or container orchestration environment must have configured Vite to listen on all network interfaces by passing the --host CLI flag (vite --host 0.0.0.0) or setting server.host: true in vite.config.js. Alternatively, local exploitation or cross-origin attacks could occur if an attacker has local network adjacency or leverages port-forwarding mechanisms.

Second, the target file must reside within a directory permitted by server.fs.allow while simultaneously being restricted by server.fs.deny. Because Vite's default configuration allows serving files from the entire project root directory and uses server.fs.deny to block sensitive files within that root (specifically .env, .env.*, *.crt, *.pem, and .git/**), any standard Vite project containing a .env file in its root or src/ directory satisfies this second prerequisite out of the box.

When a direct request is made to a restricted file without query manipulation, Vite blocks the request:

GET /.env HTTP/1.1
Host: target-dev-server:5173
 
HTTP/1.1 403 Forbidden

To bypass server.fs.deny, the attacker appends one of the transform loader queries recognized by isServerAccessDeniedForTransform. The upstream regression tests in commit 91e40d7bf9777057bbd31c3eb036a54c9465697e demonstrate several effective query payloads:

# Bypassing server.fs.deny using the ?raw loader query
curl -i "http://target-dev-server:5173/.env?raw"
 
# Bypassing using compound import and raw queries
curl -i "http://target-dev-server:5173/src/.env?import&raw"
 
# Bypassing using inline or url queries
curl -i "http://target-dev-server:5173/.env?inline"
curl -i "http://target-dev-server:5173/.env?url"
 
# Bypassing using compound extension/loader queries
curl -i "http://target-dev-server:5173/src/deny/.deny?.svg?import"
curl -i "http://target-dev-server:5173/src/deny/.deny?.svg?.wasm?init"

When the vulnerable server (Vite 6.4.4) processes GET /.env?raw, the transform middleware intercepts the request, passes /.env?raw to checkLoadingAccess, and receives an 'allowed' verdict. The raw loader plugin then strips ?raw, reads the .env file from disk, wraps its contents in a standard JavaScript ES module export default "..." statement, and returns an HTTP 200 OK response containing the full cleartext environment variables.

Impact Assessment

The security impact of CVE-2026-118662 is primarily confined to unauthorized information disclosure, though the downstream consequences depend heavily on the contents of the exposed files. The vulnerability is scored at 6.9 (Medium) under CVSS v4.0 with the vector CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:H/SI:N/SA:N.

In the CVSS v4.0 assessment, Attack Requirements (AT:P) is marked as Present because the Vite development server is not exposed to external networks in its default configuration (localhost binding) and requires specific filesystem overlap between server.fs.allow and server.fs.deny. Vulnerable System Confidentiality impact is rated Low (VC:L) because the attacker cannot traverse outside the directories explicitly permitted by server.fs.allow (for example, arbitrary system files like /etc/passwd cannot be read unless / is in server.fs.allow).

However, Subsequent System Confidentiality (SC:H) is rated High. In modern web development workflows, .env, .env.local, and .env.development files located in the project root routinely store sensitive credentials for external infrastructure. These often include cloud provider API keys (AWS, GCP, Azure), database connection strings, OAuth client secrets, payment gateway tokens, and TLS private keys (*.pem, *.crt).

Additionally, because **/.git/** is guarded by server.fs.deny inside the allowed project root, an attacker can use the ?raw or ?inline bypass to download internal Git repository objects, configuration files (.git/config), and commit histories. Exfiltrating these credentials or source code artifacts frequently enables lateral movement into cloud environments, backend databases, or source code management platforms. At the time of writing, the EPSS score for CVE-2026-118662 is 0.00295 (22.10th percentile), and there is no evidence of active exploitation in the wild or inclusion in CISA's Known Exploited Vulnerabilities (KEV) catalog.

Remediation

The primary remediation for CVE-2026-118662 is to upgrade the vite package to version 6.4.5 or later. Version 6.4.5 incorporates commit 91e40d7bf9777057bbd31c3eb036a54c9465697e, which enforces path canonicalization via cleanUrl() before evaluating server.fs access rules in the transform middleware.

Development teams can apply the update using their respective Node.js package manager:

# Using npm
npm install vite@^6.4.5 --save-dev
 
# Using pnpm
pnpm update vite
 
# Using yarn
yarn upgrade vite

> [!NOTE] > This specific regression only affects Vite 6.4.4 (>= 6.4.4, < 6.4.5). Organizations should verify their lockfiles (package-lock.json, pnpm-lock.yaml, or yarn.lock) to confirm whether 6.4.4 is pinned in active development branches or CI/CD preview environments.

In scenarios where an immediate package upgrade cannot be performed, or as a general defense-in-depth practice, organizations should enforce strict network and configuration controls around Vite development servers:

  1. Restrict Network Binding: Ensure the Vite development server is bound strictly to 127.0.0.1 (localhost). Remove --host or --host 0.0.0.0 flags from package.json scripts and set server.host: 'localhost' in vite.config.js. Never use vite dev or vite serve to serve traffic in production or untrusted staging environments.
  2. Isolate Secrets from server.fs.allow: Where possible, store sensitive .env files or private keys outside the directories listed in server.fs.allow, or restrict server.fs.allow strictly to the client source subdirectory (e.g., ./src and ./public) rather than the entire workspace root.
  3. Enforce Network-Layer Filtering: If a development server must be shared across a network (such as in a cloud development environment or containerized preview environment), place it behind an authenticating reverse proxy or Web Application Firewall (WAF) that blocks requests targeting hidden dotfiles (.env, .git) regardless of query parameters.

Official Patches

vitejsOfficial patch commit in vitejs/vite repository
vitejsVite v6.4.5 release containing the fix for CVE-2026-118662
vitejsGitHub Security Advisory GHSA-8g5g-mxqh-grgj

Fix Analysis (1)

Technical Appendix

CVSS Score
6.9/ 10
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:H/SI:N/SA:N
EPSS Probability
0.29%
Top 78% most exploited

Affected Systems

Vite (npm package `vite`) version 6.4.4

Affected Versions Detail

Product
Affected Versions
Fixed Version
vite
vitejs
>= 6.4.4, < 6.4.56.4.5
AttributeDetail
CVE IDCVE-2026-118662 (GHSA-8g5g-mxqh-grgj)
Weakness ClassCWE-180 (Validate Before Canonicalize) / CWE-284 (Improper Access Control)
CVSS v4.0 Score6.9 Medium (CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:H/SI:N/SA:N)
Attack VectorNetwork (HTTP GET request with transform query parameters)
Affected VersionsVite >= 6.4.4, < 6.4.5
Patched VersionVite 6.4.5
EPSS Score0.295% (22.10th percentile)
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1552.001Unsecured Credentials: Credentials In Files
Credential Access
T1083File and Directory Discovery
Discovery
CWE-180
Incorrect Behavior Order: Validate Before Canonicalize

The software validates inputs before they have been canonicalized or normalized, allowing attackers to bypass security checks using inputs that resolve to prohibited resource identifiers after subsequent processing.

Known Exploits & Detection

GitHub (Vite Upstream Regression Tests)Official patch commit containing test cases in `playground/fs-serve/__tests__/deny/fs-serve-deny.spec.ts` and `commonTests.ts` demonstrating `server.fs.deny` bypasses via `?raw`, `?import&raw`, and `?.svg?import`.

Vulnerability Timeline

Security patch commit 91e40d7bf9777057bbd31c3eb036a54c9465697e authored and merged into Vite.
2026-10-21
CVE-2026-118662 and GitHub Security Advisory GHSA-8g5g-mxqh-grgj officially published.
2026-10-28
NVD and OSV vulnerability records updated with CVSS v4.0 metrics and weakness classifications.
2026-10-29

References & Sources

  • [1]GitHub Security Advisory: GHSA-8g5g-mxqh-grgj
  • [2]Vite Security Patch Commit 91e40d7bf9777057bbd31c3eb036a54c9465697e
  • [3]Vite Pull Request #22160
  • [4]Vite Pull Request #23855
  • [5]Vite v6.4.5 Release Notes
  • [6]NVD - CVE-2026-118662
  • [7]CVE.org Record: CVE-2026-118662
  • [8]CVE List V5 JSON Record for CVE-2026-118662

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 1 hour ago•CVE-2026-62290
7.3

CVE-2026-62290: ClusterIssuer DNS01 Solver Policy Bypass and Credential Exfiltration in cert-manager

CVE-2026-62290 is an incorrect authorization vulnerability (CWE-863) in cert-manager that allows low-privileged Kubernetes namespace tenants to bypass ClusterIssuer DNS01 solver policies and exfiltrate cluster-scoped DNS credentials. By directly creating standalone ACME Challenge custom resources rather than going through the standard Certificate and Order workflow, an attacker can specify arbitrary solver provider configurations while referencing a privileged ClusterIssuer. The cert-manager ACME challenge controller reconciles these directly instantiated Challenge resources without verifying their parentage or validating the user-supplied solver parameters against the referenced ClusterIssuer's selector policies.

Amit Schendel
Amit Schendel
2 views•9 min read
•about 3 hours ago•CVE-2026-115909
7.5

CVE-2026-115909: Unbounded Symlink-Target Allocation Causes Process Abort in Rust zip Crate

A vulnerability in the Rust `zip` crate (versions 1.3.0 prior to 9.0.0) allows an attacker to trigger an uncatchable process abort via a crafted ZIP archive. When extracting symbolic link entries on Unix or Windows targets, `ZipArchive::extract` passes the untrusted, attacker-controlled `uncompressed_size` header value directly to `Vec::with_capacity` before reading or validating entry payload data. By supplying a 112-byte archive with a ZIP64 extended information field declaring an excessive uncompressed size, an attacker forces the memory allocator to fail and invoke `handle_alloc_error()`, immediately terminating the entire process with `SIGABRT`.

Alon Barad
Alon Barad
3 views•11 min read
•about 4 hours ago•CVE-2026-115906
6.5

CVE-2026-115906: AES Entry HMAC Authentication Bypass in Rust zip Crate

CVE-2026-115906 is a cryptographic authentication bypass vulnerability in the Rust zip library (zip-rs/zip2) affecting versions from 0.6.0 prior to 9.0.0. In the WinZip AE-x AES decryption reader implementation within src/aes.rs, the HMAC-SHA1-80 authentication tag is only validated when the internal byte counter (data_remaining) decrements to exactly zero. Because this counter is initialized from the unauthenticated compressed_size header field, an attacker can craft a ZIP archive where the entry stream hits premature physical end-of-file (EOF) before data_remaining reaches zero, causing the reader to return Ok(0) and skip HMAC verification entirely.

Alon Barad
Alon Barad
6 views•13 min read
•about 5 hours ago•CVE-2026-115908
7.4

CVE-2026-115908: Arbitrary File Write via Lexical Symlink Validation Bypass in Rust zip Crate

CVE-2026-115908 (GHSA-hjqx-j4rw-g7xv) is a high-severity path traversal and link-following vulnerability in the Rust zip library (zip-rs/zip2) affecting versions >= 7.2.0 and < 9.0.0. Because ZipArchive::extract and ZipArchive::extract_unwrapped_root_dir validate symbolic link targets solely via lexical prefix comparisons rather than resolving intermediate filesystem links, an attacker who knows or can guess the absolute extraction path can construct multi-hop symlink chains that escape the destination directory, enabling arbitrary file creation and overwrite with the privileges of the extracting process.

Amit Schendel
Amit Schendel
2 views•10 min read
•about 6 hours ago•CVE-2026-115907
7.5

CVE-2026-115907: Denial of Service via Excessive Memory Pre-allocation in Rust zip Crate Legacy Decoders

CVE-2026-115907 is an uncontrolled resource consumption vulnerability in the Rust zip crate (versions 5.1.0 through 8.6.0, and 9.0.0 pre-releases) when compiled with the optional legacy-zip feature flag. The vulnerability resides in the legacy decompression decoders—Shrink, Reduce, and Implode—which directly pass an archive-declared 64-bit uncompressed size from a ZIP64 extended information extra field to Vec::reserve() before validating the compressed data stream. By supplying a malformed ZIP archive with a declared uncompressed size exceeding isize::MAX (such as u64::MAX), an unauthenticated attacker can trigger an unhandled capacity overflow panic in the Rust standard library allocator, terminating the calling thread or aborting the entire process.

Alon Barad
Alon Barad
6 views•12 min read
•about 7 hours ago•GHSA-VPP8-G58W-M8MP
7.5

GHSA-vpp8-g58w-m8mp: HTTP/2 Rapid Reset Denial of Service in Twisted Web

Twisted versions up to and including 26.4.0 are vulnerable to an unauthenticated remote denial-of-service attack via the HTTP/2 Rapid Reset technique (a variant of CVE-2023-44487). The HTTP/2 connection handler in twisted.web processes pipelined HEADERS and RST_STREAM frames sequentially within the same TCP segment. Because the request dispatch and synchronous rendering occur upon receiving the StreamEnded event before the subsequent StreamReset event is evaluated, an attacker can force the server to expend CPU cycles rendering responses while immediately evicting stream state to bypass concurrent stream limits.

Alon Barad
Alon Barad
9 views•8 min read