CVE-2025-31125: Vite Dev Server File-Access Control Bypass
- Vendor
- Vitejs
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.
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.
Exploits
5 exploits validated by Mallory's analysis. Hidden: 2 rejected by Mallory's analysis as not a working exploit.
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.
References
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.
Recent activity
37 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.