Arbitrary File Disclosure in Vite Dev Server via ?inline&import / ?raw&import
CVE-2025-31125 is an improper access control vulnerability in the Vite development server. When a Vite dev server is explicitly exposed to the network, an attacker can use crafted import query patterns such as ?inline&import or ?raw&import to bypass intended file access restrictions, including server.fs.deny protections, and cause the server to return the contents of non-allowed files to the browser. The issue affects exposed development instances rather than default localhost-only deployments. The vulnerability was fixed in Vite versions 6.2.4, 6.1.3, 6.0.13, 5.4.16, and 4.5.11.
Are you exposed to this one?
Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.
Impact, mitigation & remediation
What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Mitigation
If you can’t patch tonight, do this now.
Remediation
Patch, then assume compromise.
Exploits
4 valid exploits after Mallory filtered fakes, detection scripts, and README-only repos (1 hidden).
This repository contains a Python proof-of-concept exploit for CVE-2025-31125, a path traversal vulnerability in the Vite Development Server's @fs endpoint. The exploit (exploit.py) allows an attacker to retrieve sensitive files from the server, such as /etc/passwd and /etc/hosts, by sending crafted HTTP GET requests to the vulnerable endpoint. The server's response is expected to contain base64-encoded file contents, which the script decodes and displays or saves to an output file. The exploit can target a single URL or scan multiple URLs from a file. The README.md provides usage instructions and context. The exploit is network-based and requires the Vite server to be accessible and vulnerable. No fake or destructive actions are present; the code is focused on file read via path traversal.
This repository contains a Python proof-of-concept exploit for CVE-2025-31125, a path traversal vulnerability in the Vite development server's @fs endpoint. The exploit consists of a single script (exploit.py) and a README.md with usage instructions. The script allows an attacker to send crafted HTTP requests to a Vite server, attempting to access sensitive files such as /etc/passwd and /etc/hosts by exploiting the path traversal flaw. The responses are expected to contain base64-encoded file contents, which the script decodes and displays or saves to an output file. The exploit can target a single URL or multiple URLs from a file. The main entry point is exploit.py, which uses the requests and colorama libraries for HTTP communication and colored output. No hardcoded IPs or domains are present; the user supplies the target(s). The exploit is a POC and does not provide post-exploitation capabilities beyond file read.
This repository provides a proof-of-concept (PoC) exploit for CVE-2025-31125, a path traversal vulnerability in the Vite development server's @fs endpoint. The exploit is implemented in Python (exploit.py) and allows an attacker to retrieve arbitrary files from a vulnerable Vite server by sending crafted HTTP GET requests to the /@fs endpoint with a specified file path (e.g., /etc/passwd, /etc/shadow, /etc/hosts, or Windows files like win.ini). The script supports both single and multiple targets, allows custom file paths, and can disable SSL verification for testing. It extracts and decodes any base64-encoded WASM content found in the server's response. The repository also includes a YAML file (CVE-2025-31125.yaml) suitable for automated scanners (e.g., Nuclei), a README with detailed usage instructions, and standard project files. The exploit targets Vite development servers exposed to the network and is effective on both Linux and Windows platforms if the server is unpatched. No weaponized or post-exploitation payloads are included; the exploit is strictly for file read (LFI) via path traversal.
This repository, 'ViteVulScan', is a Go-based operational exploit tool targeting three Vite development server vulnerabilities: CVE-2025-30208, CVE-2025-31125, and CVE-2025-31486. The tool enables detection and exploitation of arbitrary file read vulnerabilities on both Linux and Windows platforms. It supports single-target and batch exploitation, including integration with the Fofa asset search platform for mass scanning. The main logic is implemented in the 'cmd' directory, with separate modules for each CVE, command-line parsing, Fofa integration, and exploitation routines. Sensitive file paths for exploitation are provided in the 'dict' directory for both Linux and Windows. The tool can perform deep exploitation, reading and saving a wide range of sensitive files from vulnerable servers. Results are saved in a structured format under the 'result' directory. The repository is mature, operational, and suitable for both targeted and mass exploitation scenarios.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.
Recent activity
31 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.
An improper access control vulnerability in Vite that allows attackers to bypass server.fs.deny restrictions (via crafted query parameters) and read sensitive files that should be blocked, leading to unauthorized data exposure.
An improper access control vulnerability in Vitejs that could allow exposure of non-allowed files.
An improper access control issue in Vite dev servers that can allow unauthorized file disclosure via crafted query parameters, risking source code and secret leakage.
Improper access control in Vite (ViteJS) that can expose contents of non-allowed files when the Vite development server is exposed to the network.
The version that knows your environment.
Query your assets running an affected version, and investigate the blast radius.
Every observed campaign linking this CVE to a named adversary.
Malware families riding this exploit, with evidence and IOCs.
YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Cross-references every affected SKU, including bundled OEM variants.
Community discussion across Reddit, Mastodon, and other social sources.