Skip to main content
VulnerabilityPublished Updated

CVE-2024-31207: Vite's `server.fs.deny` did not deny requests for patterns with directories

Affects viteSource GCVE Database

0
Compare

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

CVSS 3.1 base score
5.9Medium
How severe the flaw is on the 0–10 CVSS scale.
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:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 13 Aug 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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

ProductAffectedFixed in
Homebrewvitepkg:brew/viteOther threatsAffected
  • >=2.7.0 <5.2.6
Fixed in
  • 5.2.6

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

Community reviews

Loading reviews…