What happened#
Vite is the build tool and dev server behind a large share of modern front-end projects. Its maintainers published advisory GHSA-p4f5-76q4-ffq7 on 10 November 2026, with sapphi-red as the publisher. It is rated Critical, with a CVSS 4.0 base score of 9.1, and no CVE has been assigned. The weakness is listed as CWE-116, improper encoding or escaping of output.
The advisory’s summary: module IDs in the __vite-browser-external and __vite-optional-peer-dep virtual modules were embedded in generated code without escaping, so injected content was treated as trusted. It says this made it possible to read files outside the server.fs allow list and to run code on the server. Four reporters are credited: g2hsec, spansh, martinpriest and zooyeon. I have left out the advisory’s reproduction steps on purpose.
The registry shows the patched releases for the 8.3, 8.1, 7.3 and 6.4 lines were published on 9 November, a day before the advisory, and that vite@8.3.8 followed on 11 November and is now thelatest tag.
Am I affected?#
The advisory’s condition is narrow: only apps that explicitly expose the dev server to the network, using --host or server.host, are affected. It lists no other conditions. A build artefact you have already deployed is not the dev server, and the advisory does not describe it as affected.
| Package | Affected | Patched |
|---|---|---|
vite | 8.3.0 to 8.3.6 | 8.3.7 |
vite | 8.2.0 to 8.2.4 | 8.2.5 |
vite | 8.0.0 to 8.1.6 | 8.1.7 |
vite | 7.0.0 to 7.3.7 | 7.3.8 |
vite | 4.0.0 to 6.4.5 | 6.4.6 |
vite-plus | 1.5.0 and earlier | 1.5.1 |
One thing I noticed when checking the registry: there is no vite@8.2.5 there. The 8.2 line goes from 8.2.4 to 8.2.6, and 8.2.6 was published on 9 November, the same day as the other patched releases. The advisory names 8.2.5 as the fix. I can’t tell you why the number is missing, so if you are on 8.2.x, install 8.2.6 or move to a newer line rather than looking for 8.2.5.
The advisory also says that in Vite 8 the vulnerable code sits in the Rolldown binary, so the fix arrives through that dependency: it says Vite 8.3.7 and 8.2.5 depend on the fix in Rolldown 1.2.17, and 8.1.7 on the fix in Rolldown 1.1.7. On the registry, vite@8.3.7, 8.3.8 and 8.2.6 each depend on rolldown@~1.2.18. I did not check the other versions’ dependencies.
What to do now#
- Find your version. Check every project that uses Vite, including monorepo packages, and any framework that bundles it. Check
vite-plustoo if you use it. - Check whether you expose the dev server. Search your scripts, config and container setup for
--hostandserver.host. Container setups often add--hostso the browser outside the container can reach the server, so look at Docker and dev-container configuration as well. - Upgrade to the patched release for your line, or to the latest. If you must stay on an affected version for now, the advisory lists no workaround. Given its stated condition, not exposing the dev server to the network (no
--host, noserver.host) would also remove the exposure, though the advisory doesn’t spell that out as a recommendation.
# Which Vite versions do you have (including nested ones)?
npm ls vite
# Is the dev server exposed? Look for --host or server.host
grep -rn -e "--host" -e "server.host" package.json vite.config.* docker-compose.* .devcontainer 2>/dev/null
# Update (pick the line you are on, or use the latest)
npm install --save-dev vite@latestIf you ran an affected dev server on a network you don’t control, the advisory doesn’t say whether it has been exploited, and it doesn’t give indicators to look for. A cautious step is to treat secrets in that project’s environment files as exposed and rotate them, since the summary says files outside the allow list could be read. That is my own precaution, not advice from the advisory.
How I checked this site#
This site is a Next.js project on Vercel. I searched its package.json for vite and found no match, and npm ls vite reports nothing installed, so it does not depend on Vite directly or through another package. That covers this repository only.
What the sources don’t say#
- Whether anyone has exploited it. The advisory does not say either way.
- Why
vite@8.2.5is absent from the registry while the advisory names it as the fix. - How the attack works beyond “an HTTP request”. The advisory doesn’t go further here, and I haven’t tried to work it out.
- I did not read independent coverage. My second source is the npm registry, for versions, dates and dependencies.
My take#
My own opinion, not from the advisory.
The advisory’s condition is easy to meet by accident. People add --host to test on a phone, or to get out of a container, and then forget it is there. Treat a dev server on a reachable address like any other server on that network: update it, and don’t leave it running on a café network or an open cloud VM. The default of listening on localhost is doing real work here.
Sources#
- Vite repository: GHSA-p4f5-76q4-ffq7, primary source for the flaw, severity, affected ranges and patched versions
- npm: vite package metadata and vite-plus package metadata (version numbers, publish times and dependencies)
Keep reading
8 min read
Nuxt 4.6.4 security release: eight advisories, including two route-rule and middleware bypasses. What to upgrade to, and how to check your app
Nuxt 4.6.4 fixes eight advisories: a leading // and an encoded %2F that can skip middleware and route rules, a dev-server file read, leaked error details and more.
7 min read
Hono advisories, November 2026 (CVE-2026-126355 to 126359 and more): what to upgrade to, and how to check your middleware
Hono 4.13.16 fixes five advisories: mount() and RegExpRouter middleware bypasses, a csrf() gap and a form validator skip. Plus two @hono/node-server fixes. What to check.