Skip to main content
Live Webinar with SANS (June 25)— Agentic CTI Automation for Fun & ProfitRegister Free
Mallory
HighCISA KEVExploited in the wildPublic exploit

Arbitrary File Disclosure in Vite Dev Server via ?inline&import / ?raw&import

IdentifiersCVE-2025-31125CWE-284· Improper Access Control

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.

Share:
For your environment

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.

ANALYST BRIEF

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.

Successful exploitation results in unauthorized disclosure of arbitrary file contents accessible to the Vite dev server process. Depending on the host environment, this can expose source code, configuration files, environment files, secrets, credentials, tokens, and other sensitive local project or system data. The issue is an information disclosure flaw rather than direct code execution, but leaked material may enable follow-on compromise, including credential abuse, lateral movement, or further attacks against development and CI/CD environments.

Mitigation

If you can’t patch tonight, do this now.

Do not expose the Vite dev server to untrusted networks. Avoid using --host or setting server.host to a non-local interface unless strictly required. Restrict access to development servers by binding to localhost, and where remote access is necessary, place the service behind firewall rules, ACLs, VPN access, or equivalent network controls. Review exposed development environments for possible sensitive file disclosure and rotate any credentials or secrets that may have been accessible.

Remediation

Patch, then assume compromise.

Upgrade Vite to a fixed release. The provided content states the vulnerability is fixed in versions 6.2.4, 6.1.3, 6.0.13, 5.4.16, and 4.5.11. Organizations should update to the appropriate patched version for their supported branch and verify that exposed development instances are no longer serving non-allowed files via crafted import queries.
PUBLIC EXPLOITS

Exploits

4 valid exploits after Mallory filtered fakes, detection scripts, and README-only repos (1 hidden).

VALID 4 / 5 TOTALView more in app
Vitejs-exploitMaturityPoCVerified exploit

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.

MuhammadWaseem29Disclosed May 3, 2025pythonnetwork
Path-Transversal-CVE-2025-31125-MaturityPoCVerified exploit

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.

harshgupptaaDisclosed Jul 13, 2025pythonnetwork
CVE-2025-31125MaturityPoCVerified exploit

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.

0xgh057r3c0nDisclosed May 7, 2025pythonyamlnetwork
ViteVulScanMaturityPoCVerified exploit

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.

jackieyaDisclosed Mar 31, 2025gonetwork
EXPOSURE SURFACE

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.

VendorProductType
VitejsViteapplication

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence

Every observed campaign linking this CVE to a named adversary.

Associated malware

Malware families riding this exploit, with evidence and IOCs.

Detection signatures1

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity20

Community discussion across Reddit, Mastodon, and other social sources.