CVE-2024-31207: Vite's `server.fs.deny` did not deny requests for patterns with directories
Affects viteSource GCVE Database
Not known to be exploited · CVSS 5.9 Medium : upgrade to 5.2.6 when convenient.
Data as of 13 Nov 2026, 23:53 UTC
- EPSS
- 0.7% chance of exploitation in 30 days – higher than 54% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 5.2.6
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:NExploitation evidence
Disclosed: evidence found.
CVE published 13 Aug 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 13 Nov 2026.
What to do
Upgrade vite to 5.2.6.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Homebrewvitepkg:brew/viteOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Upgrade Vite to one of the patched versions: 2.9.18, 3.2.10, 4.5.3, 5.0.13, 5.1.7, or 5.2.6. Avoid exposing the Vite dev server to the network unless necessary. Review and adjust any custom `server.fs.deny` patterns to avoid directory globs that may be improperly matched. Patch status is confirmed with official fixes available in the stated versions.
Description
Vite's development server option `server.fs.deny` did not properly deny requests for patterns that include directories, such as `/foo/**/*`. This issue affects applications that customize `server.fs.deny` with directory patterns and expose the Vite dev server to the network. The vulnerability arises from the use of picomatch with the `matchBase: true` option, which only matches basenames and not full paths, allowing unauthorized access to files under denied directories like `.git`. This flaw was fixed in multiple Vite versions starting with 2.9.18, 3.2.10, 4.5.3, 5.0.13, 5.1.7, and 5.2.6.
References
- github.com/vitejs/vite/security/advisories/GHSA-8jhw-289h-jh2g (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2024-31207 (opens in a new tab)
- github.com/vitejs/vite/commit/011bbca350e447d1b499d242804ce62738c12bc0 (opens in a new tab)
- github.com/vitejs/vite/commit/5a056dd2fc80dbafed033062fe6aaf4717309f48 (opens in a new tab)
- github.com/vitejs/vite/commit/89c7c645f09d16a38f146ef4a1528f218e844d67 (opens in a new tab)
- github.com/vitejs/vite/commit/96a7f3a41ef2f9351c46f3ab12489bb4efa03cc9 (opens in a new tab)
- github.com/vitejs/vite/commit/ba5269cca81de3f5fbb0f49d58a1c55688043258 (opens in a new tab)
- github.com/vitejs/vite/commit/d2db33f7d4b96750b35370c70dd2c35ec3b9b649 (opens in a new tab)
- github.com/vitejs/vite (opens in a new tab)