Skip to main content
Mallory
HighExploited in the wildCISA KEVPublic exploitVulnerability

CVE-2025-31125: Vite Dev Server File-Access Control Bypass

Published Mar 31, 2025 · Updated 1 month ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
CVSS7.5High · v3.1
EPSS14.8%97th percentile
CISA KEVYesAdded Jan 22, 2026
In the wildActivePer CISA KEV
Vendor
Vitejs
IdentifiersCVE-2025-31125CWE-284 · Improper Access Control

CVE-2025-31125 is an improper access control vulnerability in Vite development servers. Vite's server.fs.deny restrictions can be bypassed by combining inline or raw import handling with an import query parameter, causing the dev server to return contents of files that should be denied. The issue affects only Vite development servers explicitly exposed to the network.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

An unauthenticated remote attacker may retrieve the contents of otherwise non-allowed files through an exposed Vite development server. Disclosed data can include application configuration, source code, environment variables, API keys, credentials, and other secrets accessible to the development-server process.

Mitigation

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

Do not expose Vite development servers to untrusted or public networks. Avoid enabling network listening through the host command-line option or server host configuration unless required; restrict access with network segmentation, firewall rules, and authentication controls. Audit container port mappings, reverse proxies, ingress configurations, and cloud security groups for inadvertent development-server exposure.

Remediation

Patch, then assume compromise.

Upgrade Vite to a fixed release: 6.2.4 or later, 6.1.3 or later, 6.0.13 or later, 5.4.16 or later, or 4.5.11 or later, according to the supported release branch. Organizations that may have exposed vulnerable instances should assess accessible secrets as potentially disclosed and rotate or revoke them as appropriate.

Public exploits

Exploits

5 exploits validated by Mallory's analysis. Hidden: 2 rejected by Mallory's analysis as not a working exploit.

View more in app →
ViteVulScanThis 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.jackieya · Disclosed Mar 31, 2025 · go · networkOperationalVitejs-exploitThe repository contains README.md (855 bytes) and a standalone Python exploit, exploit.py (6,090 bytes). It claims to exploit CVE-2025-31125 through Vite's /@fs endpoint. Although described as path traversal, the implementation uses absolute filesystem paths with crafted import/inline/Wasm query parameters rather than explicit ../ traversal sequences. It supports individual targets or sequential processing of a target list, without authentication logic. Responses must have HTTP status 200, a Content-Type containing text/javascript, and body markers for an application/octet-stream Base64 data URI. The script extracts data after 'base64,' up to the next single quote, decodes it as UTF-8, and displays or appends it to an output file. Requests have a five-second timeout, disable TLS certificate verification, and suppress TLS warnings. The /etc/hosts request depends on successful /etc/passwd decoding, so some vulnerable configurations may be missed; other negative results and initial request failures are largely silent. There is no arbitrary-file CLI option, execution payload, or external collection endpoint. Saved results may contain terminal color sequences and do not explicitly identify the target URL. README usage examples name vite_exploit.py, but the supplied entry point is exploit.py. Exploitability was not runtime-verified. Repository URL, revision, and archive size were not supplied; empty metadata strings and a zero size represent unavailable values.alinaclark672377250 · Disclosed Nov 18, 2026 · python · webOperationalVitejs-exploitThis 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.MuhammadWaseem29 · Disclosed May 3, 2025 · python · networkPoCCVE-2025-31125This 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.0xgh057r3c0n · Disclosed May 7, 2025 · python · yaml · networkPoCPath-Transversal-CVE-2025-31125-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.harshgupptaa · Disclosed Jul 13, 2025 · python · networkPoC
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
FAQ

Frequently asked questions

Is CVE-2025-31125 exploited in the wild?
Yes. As of Oct 16, 2026, Mallory has reports of exploitation in the wild, and CISA added it to KEV on Jan 22, 2026.
Is there a public exploit for CVE-2025-31125?
Yes. Mallory tracks 5 public exploits or proofs of concept for CVE-2025-31125, the earliest disclosed Mar 31, 2025.
Is there a patch for CVE-2025-31125?
Upgrade Vite to a fixed release: 6.2.4 or later, 6.1.3 or later, 6.0.13 or later, 5.4.16 or later, or 4.5.11 or later, according to the supported release branch. Organizations that may have exposed vulnerable instances should assess accessible secrets as potentially disclosed and rotate or revoke them as appropriate.
What products are affected by CVE-2025-31125?
Vitejs Vite.
How severe is CVE-2025-31125?
CVE-2025-31125 has a CVSS v3.1 score of 7.5 (High) and an EPSS score of 14.8% (97th percentile) as of Oct 16, 2026.
Activity feed

Recent activity

37 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.

View more in app →
+9 more in the timeline. Sign up to see them
Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Mallory platform

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, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malwareMalware families linked to this CVE, with evidence and IOCs.
Detection signatures1YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity22Community discussion across Reddit, Mastodon, and other social sources.