Detect CVE-2025-31125: Vite Dev Server Improper Access Control in Sumo Logic CSE
Detects exploitation of CVE-2025-31125, an improper access control vulnerability in Vite (Vitejs) dev server. The vulnerability allows unauthorized access to sensitive files outside the intended serve root, classified under CWE-200 (Information Exposure) and CWE-284 (Improper Access Control). This vulnerability is listed in CISA KEV, indicating active exploitation in the wild.
MITRE ATT&CK
- Tactic
- Initial Access Discovery Collection
Sumo Detection Query
_sourceCategory=web* OR _sourceCategory=proxy* OR _sourceCategory=nginx* OR _sourceCategory=apache*
| where (%"cs-uri-stem" matches "*/@fs/*" or _raw matches "/@fs/")
| parse regex field=_raw "(?<uri_path>/@fs/[^\s\"']+)" nodrop
| parse regex field=_raw "\s(?<status_code>\d{3})\s" nodrop
| where uri_path matches "*../*" or uri_path matches "*%2e%2e*" or uri_path matches "*/.env*" or uri_path matches "*/etc/*" or uri_path matches "*/proc/*" or uri_path matches "*[A-Z]:/*"
| count by _sourceHost, src_ip, uri_path, status_code
| where status_code = "200" or _count > 5
| order by _count desc Sumo Logic query to detect CVE-2025-31125 exploitation by identifying path traversal requests to Vite /@fs/ endpoints, particularly those returning HTTP 200 indicating successful unauthorized file access.
Data Sources
Required Tables
False Positives & Tuning
- Legitimate Vite development server traffic with complex workspace configurations
- Authorized penetration testing and vulnerability scanning activities
- Developers using Vite's file system serving for legitimate cross-directory module resolution
- Load balancer health checks hitting Vite-specific endpoints
Other platforms for CVE-2025-31125
Testing Methodology
Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1Vite /@fs/ Path Traversal to Read /etc/passwd
Expected signal: HTTP GET request to /@fs/etc/passwd and variants logged in web server access logs; Node.js process accessing /etc/passwd on the file system; network connection from test host to port 5173
- Test 2Vite Dev Server Environment File Extraction
Expected signal: HTTP requests to /@fs/ with absolute paths to .env files; file system read events on .env and config files; response body containing environment variable content if successful
- Test 3Automated CVE-2025-31125 Exploitation Scan
Expected signal: Rapid sequential HTTP GET requests to /@fs/ endpoint with multiple sensitive path targets; consistent source IP across all requests; mix of 200 and 403 response codes; elevated request rate to Vite dev server port
Unlock Pro Content
Get the full detection package for CVE-2025-31125 including response playbook, investigation guide, and atomic red team tests.