WizがGoogle Cloudに参加:共に魔法を作り出す

CVE-2026-140097: 
JavaScript 脆弱性分析と緩和策

概要

CVE-2026-140097 is a critical remote code execution vulnerability in the Vite JavaScript frontend tooling framework, caused by improper encoding or escaping of output (CWE-116) in the __vite-browser-external and __vite-optional-peer-dep virtual modules. Affecting Vite versions 4.0.0 through 6.4.5, 7.0.0 through 7.3.7, 8.0.0 through 8.1.6, 8.2.0 through 8.2.4, and 8.3.0 through 8.3.6, as well as vite-plus prior to 1.5.1, the vulnerability was disclosed on November 10, 2026 via a GitHub Security Advisory. It carries a CVSS v4.0 base score of 9.1 (Critical) (GitHub Advisory).

技術的詳細

The root cause is that Vite's resolver plugin embeds request-derived module identifiers from the __vite-browser-external:<suffix> and __vite-optional-peer-dep:<suffix> virtual modules directly into generated JavaScript without proper escaping (CWE-116). Because Vite trusts the generated module code, an attacker can craft a malicious HTTP request to the /@id/ endpoint with a suffix that breaks out of the virtual module template, injecting arbitrary JavaScript including import statements. This injection has two exploitation paths: first, any file referenced by an injected import is added to the server.fs allow list, bypassing file access restrictions; second, Vite's use of eval for new Worker and import.meta.glob processing allows the injected code to be evaluated server-side, with sandbox bypasses available via globalThis.process.getBuiltinModule. In Vite v8, the vulnerable code resides in the Rolldown binary and was fixed in Rolldown 1.1.7 (for Vite 8.1.7) and Rolldown 1.2.17 (for Vite 8.2.5 and 8.3.7) (GitHub Advisory, Fix PR #24043, Fix PR #24044).

影響

Successful exploitation allows an unauthenticated remote attacker to read arbitrary local files outside the server.fs allow list and execute arbitrary code in the development-server process. Confidentiality is severely impacted through disclosure of sensitive files (e.g., credentials, environment files, source code) accessible on the server's filesystem, and integrity is compromised through arbitrary code execution running as the Vite dev server process. Availability is not directly impacted per the CVSS scoring, but code execution could enable further lateral movement or persistence on the developer's machine (GitHub Advisory).

利用可能性

A proof-of-concept exploit is publicly documented in the GitHub Security Advisory (GHSA-p4f5-76q4-ffq7), demonstrating the file read primitive via crafted HTTP requests. The vulnerability requires no authentication and no user interaction, but does require the Vite dev server to be network-exposed (via --host or server.host configuration). There is no evidence of in-the-wild exploitation at the time of disclosure, and no threat actor attribution has been reported. The EPSS score is 0.0 and the vulnerability is not listed in the CISA KEV catalog (GitHub Advisory, Feedly).

エクスプロイテーションのステップ

  1. Reconnaissance: Identify network-exposed Vite development servers (running with --host or server.host enabled) on the target network using port scanning tools such as Nmap or Shodan, targeting the default Vite dev server port (5173).
  2. Verify file access restriction: Confirm the target file is blocked by sending GET /@fs/tmp/decoy-secret.txt — a correctly configured server returns 403 Restricted ("outside of Vite serving allow list").
  3. Inject malicious module identifier: Send a crafted HTTP request to the /@id/ endpoint with a percent-encoded payload that breaks out of the virtual module template and injects an import statement for the target file:
    GET /@id/__vite-browser-external:`);}});%0aimport '/@fs/tmp/decoy-secret.txt';%0avar z=new Proxy({}, {get(_, key) {throw new Error(`?import
    This pulls the target file into the Vite module graph and adds it to the server.fs allow list.
  4. Retrieve the restricted file: Send GET /@fs/tmp/decoy-secret.txt — the server now returns the file contents in the response body.
  5. Achieve server-side code execution (optional): Craft a payload that leverages Vite's eval-based processing (via new Worker or import.meta.glob) and uses globalThis.process.getBuiltinModule to access Node.js built-in modules, enabling arbitrary command execution on the server host (GitHub Advisory).

妥協の兆候

  • Network: Unusual HTTP GET requests to /@id/__vite-browser-external: or /@id/__vite-optional-peer-dep: endpoints containing percent-encoded newlines (%0a) or JavaScript syntax characters (backticks, semicolons, import keywords) in the path.
  • Network: Repeated or anomalous requests to /@fs/ paths for files outside the project root (e.g., /tmp/, /etc/, home directories) from unexpected source IPs.
  • Logs: Vite dev server access logs showing requests to /@id/ with unusually long or specially encoded path suffixes; HTTP 200 responses to /@fs/ paths that previously returned 403.
  • Process: Unexpected child processes spawned by the Vite/Node.js dev server process (e.g., sh, bash, curl, wget, python) indicating server-side code execution.
  • File System: New or modified files in the project directory created by the Node.js process, or evidence of access to sensitive files (e.g., .env, SSH keys, credential files) outside the project root (GitHub Advisory).

緩和策と回避策

Upgrade Vite to one of the patched versions: 6.4.6, 7.3.8, 8.1.7, 8.2.5, or 8.3.7 depending on the branch in use. Users of vite-plus should upgrade to 1.5.1 or later. The fix applies proper JSON.stringify-based escaping to module identifiers before embedding them in generated JavaScript. As an immediate workaround, avoid exposing the Vite dev server to untrusted networks — do not use --host or set server.host unless strictly necessary, and restrict access to trusted networks only via firewall rules (GitHub Advisory, Fix PR #24044).

コミュニティの反応

The advisory was published by Vite maintainer sapphi-red on November 10, 2026, and credited reporters g2hsec, spansh, martinpriest, and zooyeon. The fix was labeled p5-urgent in the Vite repository, indicating the highest priority for release. Community uptake of the patch was rapid, with multiple downstream projects (e.g., bootstrap, itbeard-site, ThreadPulse-Daily) merging the Vite 6.4.6 security update within days of disclosure (GitHub Advisory, Fix PR #24044).

追加リソース


ソース: この報告書はAIを用いて作成されました

関連 JavaScript 脆弱性:

CVE ID

重大度

スコア

テクノロジー

コンポーネント名

CISA KEVのエクスプロイト

修正あり

出版日

CVE-2026-140097CRITICAL9.1
  • JavaScript logoJavaScript
  • vite
いいえはいNov 30, 2026
CVE-2026-140010HIGH8.7
  • JavaScript logoJavaScript
  • html-minifier
いいえはいNov 30, 2026
CVE-2026-140008HIGH8.7
  • JavaScript logoJavaScript
  • minimatch
いいえはいNov 30, 2026
CVE-2026-140102HIGH7.5
  • JavaScript logoJavaScript
  • http-proxy-middleware
いいえいいえNov 30, 2026
CVE-2026-140103MEDIUM5.4
  • JavaScript logoJavaScript
  • http-proxy-middleware
いいえはいNov 30, 2026

無料脆弱性評価

クラウドセキュリティの姿勢をベンチマークしましょう

9つのセキュリティ領域にわたるクラウドセキュリティの実践を評価し、リスクレベルをベンチマークし、防御のギャップを特定しましょう。

評価のリクエスト

Wizのその他のリソース

パーソナライズされたデモを見る

実際に Wiz を見てみませんか?​

"私が今まで見た中で最高のユーザーエクスペリエンスは、クラウドワークロードを完全に可視化します。"
デビッド・エストリックCISO (最高情報責任者)
"Wiz を使えば、クラウド環境で何が起こっているかを 1 つの画面で確認することができます"
アダム・フレッチャーチーフ・セキュリティ・オフィサー
"Wizが何かを重要視した場合、それは実際に重要であることを私たちは知っています。"
グレッグ・ポニャトフスキ脅威および脆弱性管理責任者