{
  "url": "https://tldrcve.com/vite-dev-server/",
  "json": "https://tldrcve.com/vite-dev-server.json",
  "verdict_label": "Patch now if…",
  "scare_label": "Keep an eye on it",
  "slug": "vite-dev-server",
  "name": "Vite dev server",
  "aliases": [
    "vite",
    "vitejs",
    "vite-plus",
    "rolldown",
    "dev server",
    "--host",
    "server.host",
    "__vite-browser-external",
    "rce",
    "remote code execution",
    "cve-2026-140097",
    "ghsa-p4f5-76q4-ffq7"
  ],
  "cves": [
    "CVE-2026-140097"
  ],
  "ghsa": [
    "GHSA-p4f5-76q4-ffq7"
  ],
  "product": "Vite",
  "disclosed": "2026-11-10",
  "news": "2026-11-30",
  "updated": "2026-12-01",
  "verdict": "if",
  "tile_line": "Only dev servers opened to the network.",
  "tldr": "Vite's dev server lets anyone who can reach it read files and run code on the machine running it. Steps to read files are public; no attacks seen. Only the dev server is affected, and only when exposed with `--host` or `server.host`. Update Vite.",
  "summary": "Vite rates it Critical (CVSS 4.0 9.1); its advisory and fixes came out on 9 and 10 Nov, and the CVE record followed on 30 Nov. A request with a crafted module name gets the attacker's text into a module Vite trusts, so the dev server serves files outside its allow list and can evaluate the code. Attackers have gone after exposed Vite dev servers before: CVE-2025-31125, which needs the same setup, has been on CISA's KEV list since 22 Jan 2026.",
  "status": {
    "exploit": "public",
    "attacks": "none",
    "kev": null,
    "no_login": true,
    "scare": 1.8
  },
  "affected": [
    {
      "label": "Vite 4.0 or later without the fix",
      "text": "Affected: 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, plus vite-plus before 1.5.1. Vite 8.4 isn't listed. On Vite 8 the faulty code is in the Rolldown bundler that Vite uses, and the fixed Vite releases pull in a fixed Rolldown. Check which Vite your project installs with `npm ls vite`.",
      "cite": [
        1,
        2,
        9
      ]
    },
    {
      "label": "The dev server is exposed",
      "text": "Only the dev server is affected, and only when started with `--host` or with `server.host` set in the Vite config. Without them it listens on `localhost` only. Look for `--host` in your dev script and `server.host` in `vite.config.*`.",
      "cite": [
        1,
        5
      ]
    },
    {
      "label": "An attacker can reach that port",
      "text": "No login is needed: one crafted HTTP request to the dev server can trigger it. With `--host` (or `server.host` set to `true` or `'0.0.0.0'`) it listens on all addresses, \"including LAN and public addresses\", so anyone on the same network, or the internet if the port is open, can send that request.",
      "cite": [
        1,
        2,
        5
      ]
    }
  ],
  "do": [
    {
      "label": "Update Vite",
      "text": "First fixed: 8.3.7, 8.2.6, 8.1.7, 7.3.8 and 6.4.6; Vite 8.4 isn't listed as affected. Vite's advisory names 8.2.5, which is tagged on GitHub but isn't on npm; 8.2.6 has the same fix. 8.1.7 has the fix too, but Vite no longer supports 8.1 or older, so on Vite 4, 5 or an older 8.x line move to a supported one. vite-plus is fixed in 1.5.1.",
      "versions": [
        "vite"
      ],
      "cite": [
        1,
        3,
        4,
        6,
        10
      ]
    },
    {
      "label": "Keep the dev server private",
      "text": "In our view, a dev server shouldn't face the network. If you need `--host`, for example in a container, we'd keep its port reachable only from your own machine, and stop the server when you're done.",
      "cite": [
        1,
        5
      ]
    }
  ],
  "fixed_in": {
    "vite": {
      "8.3": "8.3.7",
      "8.2": "8.2.6",
      "7.3": "7.3.8",
      "6.4": "6.4.6"
    }
  },
  "sources": [
    {
      "title": "Vite GHSA-p4f5: Critical, CVSS 4.0 9.1; only dev servers exposed with --host or server.host; PoC; fixed in 8.3.7, 8.2.5, 8.1.7, 7.3.8, 6.4.6, vite-plus 1.5.1",
      "url": "https://github.com/vitejs/vite/security/advisories/GHSA-p4f5-76q4-ffq7",
      "date": "10 Nov"
    },
    {
      "title": "CVE record: CVE-2026-140097, network-exposed development server, file disclosure and code execution",
      "url": "https://www.cve.org/CVERecord?id=CVE-2026-140097",
      "date": "30 Nov"
    },
    {
      "title": "Vite 8.3.7 release, 9 Nov 2026",
      "url": "https://github.com/vitejs/vite/releases/tag/v8.3.7",
      "date": "9 Nov"
    },
    {
      "title": "npm registry: Vite releases; 8.2.6 published 9 Nov, no 8.2.5",
      "url": "https://registry.npmjs.org/vite"
    },
    {
      "title": "Vite docs: server.host defaults to localhost; --host or 0.0.0.0 listens on all addresses",
      "url": "https://vite.dev/config/server-options"
    },
    {
      "title": "Vite: supported versions; everything before 8.4, 8.3, 8.2, 7.3 and 6.4 is unsupported",
      "url": "https://vite.dev/releases"
    },
    {
      "title": "CISA KEV catalog: CVE-2026-140097 not listed; CVE-2025-31125 added 22 Jan 2026",
      "url": "https://www.cisa.gov/known-exploited-vulnerabilities-catalog"
    },
    {
      "title": "Vite GHSA-4r4m (CVE-2025-31125): only dev servers exposed with --host or server.host",
      "url": "https://github.com/vitejs/vite/security/advisories/GHSA-4r4m-qw57-chr8"
    },
    {
      "title": "npm docs: npm ls lists installed packages",
      "url": "https://docs.npmjs.com/cli/commands/npm-ls/"
    },
    {
      "title": "Vite 8.2.6 changelog: same Rolldown update as 8.2.5",
      "url": "https://github.com/vitejs/vite/blob/v8.2.6/packages/vite/CHANGELOG.md"
    },
    {
      "title": "cvedotnow on X: shares it as Critical 9.1, 30 Nov 2026",
      "url": "https://x.com/cvedotnow/status/2127541281035317707",
      "date": "30 Nov"
    }
  ],
  "changes": [
    {
      "date": "2026-12-01",
      "text": "Published."
    }
  ],
  "status_cite": {
    "exploit": [
      1
    ],
    "attacks": [
      7
    ],
    "kev": [
      7
    ],
    "no_login": [
      1,
      2
    ]
  },
  "safe_versions": [
    {
      "id": "vite",
      "name": "Vite",
      "url": "https://tldrcve.com/versions/vite/",
      "json": "https://tldrcve.com/versions/vite.json",
      "checked": "2026-12-03",
      "lines": [
        {
          "line": "8.4",
          "latest": "8.4.1",
          "released": "2026-12-02"
        },
        {
          "line": "8.3",
          "latest": "8.3.8",
          "released": "2026-11-11"
        },
        {
          "line": "8.2",
          "latest": "8.2.6",
          "released": "2026-11-09",
          "note": "Security patches only."
        },
        {
          "line": "7.3",
          "latest": "7.3.8",
          "released": "2026-11-09"
        },
        {
          "line": "6.4",
          "latest": "6.4.6",
          "released": "2026-11-09",
          "note": "Security patches only."
        }
      ],
      "older": "Vite says all versions before these are no longer supported. Check with `npm ls vite`."
    }
  ]
}
