CVE-2022-35204
JavaScript vulnerability analysis and mitigation

Overview

A directory traversal vulnerability was discovered in Vitejs Vite versions before v2.9.13, identified as CVE-2022-35204. The vulnerability was reported on June 8, 2022, and allows attackers to perform directory traversal attacks via crafted URLs to the victim's service (CVE Mitre).

Technical details

The vulnerability stems from an incomplete fix of a previous issue (#2820), where the @fs directory checking mechanism failed to properly validate encoded paths. While the system checks for allowed paths, it can be bypassed using URL-encoded traversal sequences. For example, if /@fs/home/test/ is an allowed path, attackers could bypass restrictions using encoded sequences like /@fs/home/test/%2e%2e%2f%2e%2e%2f (which translates to ../../) (GitHub Issue).

Impact

This vulnerability allows attackers to access files outside of the intended directory structure, potentially exposing sensitive system files. The issue affects both Windows and Linux systems, enabling unauthorized access to system files such as /etc/hosts on Linux or C:/Windows/System32/drivers/etc/hosts on Windows systems (GitHub Issue).

Mitigation and workarounds

The vulnerability was patched in Vite version 2.9.13. Users are strongly advised to upgrade to this version or later to protect against this security issue (GitHub Release).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-66456CRITICAL9.1
  • JavaScriptJavaScript
  • elysia
NoYesDec 09, 2025
CVE-2025-66457HIGH7.5
  • JavaScriptJavaScript
  • elysia
NoYesDec 09, 2025
CVE-2025-65849MEDIUM6.9
  • JavaScriptJavaScript
  • altcha
NoNoDec 08, 2025
CVE-2025-66202MEDIUM6.5
  • JavaScriptJavaScript
  • astro
NoYesDec 09, 2025
CVE-2025-14284MEDIUM5.1
  • JavaScriptJavaScript
  • @tiptap/extension-link
NoYesDec 09, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management