-
-
Notifications
You must be signed in to change notification settings - Fork 8k
Labels
p5-urgentFix build-breaking bugs affecting most users, should be released ASAP (priority)Fix build-breaking bugs affecting most users, should be released ASAP (priority)
Description
Describe the bug
The entire filesystem is indiscriminately exposed while the Vite dev server is running. Combined with the fact that the server is exposed to 0.0.0.0 by default, you're effectively opening your machine to the world during development.
This is technically a Vite feature as currently documented, but probably not actually intended.
Reproduction
Any Vite project will do.
npm init @vitejs/app app
cd app
npm install
npm run dev- If running on Windows, visit http://localhost:3000/@fs/windows/debug/netsetup.log
- If running on Linux, visit http://localhost:3000/@fs/etc/passwd
- No idea of an equivalent on macOS but I'm sure you can think of something
Combined with the fact that any "out of root" directories already reveal the username of the current user, you can also easily do http://localhost:3000/@fs/home/username/.ssh/id_rsa
System Info
System:
OS: Windows 10 10.0.19042
CPU: (16) x64 AMD Ryzen 7 3700X 8-Core Processor
Memory: 19.47 GB / 31.95 GB
Binaries:
Node: 14.16.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.10 - ~\AppData\Roaming\npm\yarn.CMD
npm: 7.7.5 - C:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: 89.0.4389.114
Edge: Spartan (44.19041.423.0), Chromium (89.0.774.63)
Internet Explorer: 11.0.19041.1
npmPackages:
vite: ^2.1.5 => 2.1.5
Used package manager: npm
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
p5-urgentFix build-breaking bugs affecting most users, should be released ASAP (priority)Fix build-breaking bugs affecting most users, should be released ASAP (priority)