Vite dev server flaw (GHSA-p4f5-76q4-ffq7, CVSS 9.1) allows file read and RCE on network-exposed instances; PoC public
Vite maintainers published an advisory (GHSA-p4f5-76q4-ffq7) and a proof-of-concept for a flaw rated CVSS v4.0 9.1. A single HTTP request can read private files or run code on a dev server that is reachable over the network. The default localhost-only binding is not affected. Servers started with --host or server.host, for example in Docker, cloud IDEs and test hosts, are exposed. The article says no CVE ID has been assigned and that neither the maintainers nor CISA confirm in-the-wild exploitation. No primary source was checked, so the details below come from the article alone.
Entenda a falha
A vulnerabilidade
A critical flaw (GHSA-p4f5-76q4-ffq7, CVSS v4.0 9.1, no CVE assigned yet) in the Vite dev server lets one HTTP request read private files or run code on the host. The attacker needs network access to the dev server, with no authentication. The default localhost-only binding is not affected; servers started with --host or server.host (Docker, cloud IDEs, test hosts) are. Affected: Vite 8.3.0-8.3.6, 8.2.0-8.2.4, 8.0.0-8.1.6, 7.0.0-7.3.7, 4.0.0-6.4.5 and vite-plus 1.5.0 and older. Fixed in Vite 8.3.7, 8.2.5, 8.1.7, 7.3.8, 6.4.6 and vite-plus 1.5.1.
Como funciona
A request reaches the dev server for one of the resolver plugin's virtual modules, vite-browser-external: or vite-optional-peer-dep:. The plugin builds module code from the request URL, including the suffix, without escaping it, so injected text becomes code inside a module Vite trusts. Files imported by a trusted module skip the server.fs allow-list check, so private files outside the project root enter the module graph and can be downloaded. Separately, Vite uses eval on module values for new Worker and import.meta.glob; injected code reaches that eval and can use globalThis.process.getBuiltinModule to run OS commands on the Node.js host.
Por que é vulnerável
The root cause is CWE-116: improper encoding or escaping of output. The resolver plugin did not escape the string when generating code for its virtual modules. That made injection possible, and two existing design choices amplified it: the server.fs allow-list is skipped for files imported by trusted modules, and Vite uses eval on module values for new Worker and import.meta.glob. The articles do not describe the exact code change; they say the Vite 8 fix relies on Rolldown 1.2.17 and 1.1.7.
Onde está
The resolver plugin's virtual modules vite-browser-external: and vite-optional-peer-dep:, plus the server.fs allow-list check and the eval used for new Worker and import.meta.glob; the advisory is GHSA-p4f5-76q4-ffq7.
Como foi descoberta
The articles credit four reporters: g2hsec, spansh, martinpriest and zooyeon. They do not say how the flaw was found. The Vite maintainers published the GitHub security advisory with full details and a proof of concept. No CVE ID has been assigned, and neither the maintainers nor CISA confirm exploitation in the wild.
PoC pública
A working proof-of-concept exploit is published in the GitHub advisory by the maintainers. According to the articles it shows that a single HTTP request can read private files or run OS commands on a network-exposed dev server. Because it is public and the attack needs no authentication, teams with exposed dev servers should patch or remove --host quickly, even though no in-the-wild exploitation is confirmed.
Explicação gerada por IA a partir da matéria e dos artigos, em 18/11/2026 07:15.
Detalhes técnicos
The flaw is CWE-116. The resolver plugin's virtual modules __vite-browser-external:<suffix> and __vite-optional-peer-dep:<suffix> build code from the request URL without escaping the suffix. This allows code injection into a trusted module. Files imported by a trusted module bypass the server.fs allow-list, which allows arbitrary file read. Injected code also reaches the eval that Vite uses for new Worker and import.meta.glob. From there, globalThis.process.getBuiltinModule can run OS commands on the Node.js host.
Affected versions:
- Vite 8.3.0–8.3.6, 8.2.0–8.2.4 and 8.0.0–8.1.6.
- Vite 7.0.0–7.3.7.
- Vite 4.0.0–6.4.5.
- vite-plus 1.5.0 and older.
Reporters credited: g2hsec, spansh, martinpriest and zooyeon.
Remediação
Upgrade to Vite 8.3.7, 8.2.5, 8.1.7, 7.3.8 or 6.4.6, or to vite-plus 1.5.1. The Vite 8 fix relies on Rolldown 1.2.17 and 1.1.7. Until patched, remove --host and bind the dev server to localhost only. Rotate keys and .env secrets on any server that was exposed to an untrusted network.
Linha do tempo
-
Vite dev server flaw (GHSA-p4f5-76q4-ffq7, CVSS 9.1) allows file read and RCE on network-exposed instances; PoC public
ler a análise desta fonte ocultar
Vite maintainers published an advisory (GHSA-p4f5-76q4-ffq7) and a proof-of-concept for a flaw rated CVSS v4.0 9.1. A single HTTP request can read private files or run code on a dev server that is reachable over the network. The default localhost-only binding is not affected. Servers started with
--hostorserver.host, for example in Docker, cloud IDEs and test hosts, are exposed. The article says no CVE ID has been assigned and that neither the maintainers nor CISA confirm in-the-wild exploitation. No primary source was checked, so the details below come from the article alone.Technical Details
The flaw is CWE-116. The resolver plugin's virtual modules
__vite-browser-external:<suffix>and__vite-optional-peer-dep:<suffix>build code from the request URL without escaping the suffix. This allows code injection into a trusted module. Files imported by a trusted module bypass theserver.fsallow-list, which allows arbitrary file read. Injected code also reaches theevalthat Vite uses fornew Workerandimport.meta.glob. From there,globalThis.process.getBuiltinModulecan run OS commands on the Node.js host.Affected versions:
- Vite 8.3.0–8.3.6, 8.2.0–8.2.4 and 8.0.0–8.1.6.
- Vite 7.0.0–7.3.7.
- Vite 4.0.0–6.4.5.
- vite-plus 1.5.0 and older.
Reporters credited: g2hsec, spansh, martinpriest and zooyeon.
Remediation
Upgrade to Vite 8.3.7, 8.2.5, 8.1.7, 7.3.8 or 6.4.6, or to vite-plus 1.5.1. The Vite 8 fix relies on Rolldown 1.2.17 and 1.1.7. Until patched, remove
--hostand bind the dev server to localhost only. Rotate keys and.envsecrets on any server that was exposed to an untrusted network.