Skip to content
OpenAdvisories
Medium · 4.8 CVE-2024-45811 EUVD-2024-2759GHSA-9cwx-2883-4wfx

server.fs.deny bypassed when using ?import&raw in vite

Published Sep 17, 2024 · Updated Sep 18, 2024 · Assigned by GitHub_M

Description

Vite a frontend build tooling framework for javascript. In affected versions the contents of arbitrary files can be returned to the browser. `@fs` denies access to files outside of Vite serving allow list. Adding `?import&raw` to the URL bypasses this limitation and returns the file content if it exists. This issue has been patched in versions 5.4.6, 5.3.6, 5.2.14, 4.5.5, and 3.2.11. Users are advised to upgrade. There are no known workarounds for this vulnerability.

Affected products

VendorProductAffectedFixed
vitejs vite >= 5.4.0, < 5.4.6, >= 5.3.0, < 5.3.6, >= 5.0.0, < 5.2.14, >= 4.0.0, < 4.5.5, < 3.2.11 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
openSUSE Tumbleweed velociraptor 0.7.0.4.git142.862ef23-1.1 openSUSE-SU-2025:14663-1

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling vite 5.4.6-r0 —

Affected packages

EcosystemPackageAffectedFixedRecord
npm vite >= 5.4.0, < 5.4.6 5.4.6 GHSA-9cwx-2883-4wfx
npm vite >= 5.3.0, < 5.3.6 5.3.6 GHSA-9cwx-2883-4wfx
npm vite >= 5.2.0, < 5.2.14 5.2.14 GHSA-9cwx-2883-4wfx
npm vite >= 4.0.0, < 4.5.4 4.5.4 GHSA-9cwx-2883-4wfx
npm vite < 3.2.11 3.2.11 GHSA-9cwx-2883-4wfx
npm vite >= 5.0.0, < 5.1.8 5.1.8 GHSA-9cwx-2883-4wfx

Advisories 1

References