CVE-2022-35204 Vite before v2.9.13 vulnerable to directory traversal via crafted URL to victim's service

Medium 4.3 Published Updated

Attackers can read arbitrary files from the victim's system via directory traversal in the Vite development server.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2022-35204?

CVE-2022-35204 is a medium-severity path traversal vulnerability in n/a, published on 18 Aug 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

Vitejs Vite before v2.9.13 was discovered to allow attackers to perform a directory traversal via a crafted URL to the victim's service.

Weakness: CWE-22

Which versions are affected by CVE-2022-35204?

4 open source packages ship an affected version, including vite. It affects 1 product.

PackageAffectedFixed in
vite npmAll versions2.9.13
vite npmAll versions2.9.13
vite npmFrom 3.0.0-alpha.03.0.0-beta.4
vite npmFrom 3.0.0-alpha.03.0.0-beta.4

Products include Vitejs Vite.

How do I fix CVE-2022-35204?

Upgrade vite to a fixed version for your release line: 2.9.13 or 3.0.0-beta.4.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2022-35204 being exploited?

There is no known exploitation of CVE-2022-35204 in the wild and no public exploit code.

Sources

Also known as GHSA-mv48-hcvh-8jj8.

Is CVE-2022-35204 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free