CVE-2025-31125 Google Chronicle · YARA-L

Detect CVE-2025-31125: Vite Dev Server Improper Access Control in Google Chronicle

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

YARA-L Detection Query

Google Chronicle (YARA-L)
yaral
rule cve_2025_31125_vite_path_traversal {
  meta:
    author = "df00tech"
    description = "Detects CVE-2025-31125 Vite improper access control exploitation via /@fs/ path traversal"
    severity = "HIGH"
    priority = "HIGH"
    cve = "CVE-2025-31125"
    mitre_attack = "T1190, T1083"

  events:
    $req.metadata.event_type = "NETWORK_HTTP"
    (
      re.regex($req.network.http.request_url, `.*/@fs/.*(\.\.|\.env|/etc/|/proc/|passwd|shadow).*`) or
      re.regex($req.network.http.request_url, `.*/@fs/[A-Za-z]:.*`) or
      re.regex($req.network.http.request_url, `.*/@fs//(?:etc|home|root|proc|var).*`)
    )

  condition:
    $req
}
high severity high confidence

Chronicle YARA-L rule detecting HTTP requests to Vite dev server /@fs/ endpoints with path traversal patterns associated with CVE-2025-31125 exploitation.

Data Sources

Chronicle UDM EventsWeb Proxy LogsNetwork Telemetry

Required Tables

NETWORK_HTTP

False Positives & Tuning

  • Legitimate Vite dev server module resolution for workspace or monorepo packages
  • Security tooling performing authorized vulnerability assessments
  • Development environments with non-standard Vite server.fs.allow configurations
  • Internal developer tooling that programmatically traverses Vite-served file trees

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.

  1. 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

  2. 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

  3. 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.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections