Skip to content
Noroxi
CVE-2025-58751· NVD / CVE Program· CNA GitHub_M

Vite middleware may serve files starting with the same name with the public directory

Vite is a frontend tooling framework for JavaScript. Prior to versions 7.1.5, 7.0.7, 6.3.6, and 5.4.20, files starting with the same name with the public directory were served bypassing the `server.fs` settings. Only apps that explicitly expose the Vite dev server to the network (using --host or `server.host` config option), use the public directory feature (enabled by default), and have a symlink in the public directory are affected. Versions 7.1.5, 7.0.7, 6.3.6, and 5.4.20 fix the issue.

LowCVSS 2.3 · v4.0—Proof of concept Fix available
Published
Sep 8, 2025
Updated
Jun 17, 2026
EPSS
1.2% · 68th percentile
Follow this CVE

Sign in to follow · You’ll be notified if a followed record enters KEV, gets an exploit or is updated.

Report tools

JSON

Action score

9

Monitor

Low priority for now.

CVSS
9 / 40 · 2.3 / 10
CISA KEV
0 / 30 · Not listed
EPSS
0 / 30 · 1.2%

CISA SSVC decision

Exploitation
proof of concept
Automatable
no
Technical impact
partial

Vulnrichment: CISA's decision-tree inputs.

CNA vs NVD score

NVD
—
CNA · GitHub_M
2.3
NVD has not scored this yet; the score shown is the CNA’s.

CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N

The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.

Noroxi analysis

No Noroxi analysis for this record yet

We don't hand-write analysis for the hundreds of thousands of vulnerabilities in the database; that wouldn't be honest. For notable, high-impact vulnerabilities our team writes the mechanism, detection and remediation steps.

We use this product, ask for help

Affected systems

VendorProduct
vitejsvite

Affected versions

NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.

  • vitejs vitebefore 5.4.20
  • vitejs vite6.0.0 and later · before 6.3.6
  • vitejs vite7.0.0 and later · before 7.0.7
  • vitejs vite7.1.0 and later · before 7.1.5

Versions reported by the vendor

Affected version ranges reported by the assigning authority (GitHub_M). Independent of NVD's CPE analysis and usually ahead of it.

  • vitejs vite

    • < 5.4.20, >= 6.0.0, < 6.3.6, >= 7.0.0, < 7.0.7, >= 7.1.0, < 7.1.5affected

Package-level exposure

OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.

EcosystemPackageAffected rangeFix
npmvitefrom 6.0.0 · before 6.3.66.3.6
npmvitefrom 7.0.0 · before 7.0.77.0.7
npmvitefrom 7.1.0 · before 7.1.57.1.5
npmvitebefore 5.4.205.4.20

Other highest-scoring records for the same primary product.

  • CVE-2025-31125Vite has a `server.fs.deny` bypassed for `inline` and `raw` with `?import` queryKEV
    80Now
  • CVE-2025-30208Vite bypasses server.fs.deny when using `?raw??`
    52Plan
  • CVE-2026-39363Vite Affected by Arbitrary File Read via Vite Dev Server WebSocket
    33Monitor
  • CVE-2025-31486Vite allows server.fs.deny to be bypassed with .svg or relative paths
    33Monitor
  • CVE-2026-53571Vite: `server.fs.deny` bypass on Windows alternate paths
    32Monitor
  • CVE-2026-39364Vite has a `server.fs.deny` bypass with queries
    32Monitor

Remediation

Which version to upgrade to

Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.

Product / packageFixed versionSource
npm:vite5.4.20Package registry (OSV)
npm:vite6.3.6Package registry (OSV)
npm:vite7.0.7Package registry (OSV)
npm:vite7.1.5Package registry (OSV)

Exploit status

Proof of concept available

A public proof of concept or detection signature exists. Exploit knowledge is out there; don't delay patching.

Evidence

  • Nuclei detection template ×1

Noroxi does not host or link to exploit code. Metasploit module names and Nuclei template ids are shown (names, not code); Exploit-DB entries and PoC repositories are given as counts only.

Public exploit evidence
SourceKindDate
Nuclei detection templateNuclei template CVE-2025-58751 —

Research context

For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.

Timeline

From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.

No dated events beyond publication.

EPSS, last 120 days

FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).

Patch and commit links

Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.

Finders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.

No credits in the CNA record.

Variant candidates

Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.

  • CVE-2026-53571287 days apartVite: `server.fs.deny` bypass on Windows alternate paths
    32Monitor
  • CVE-2026-39365211 days apartVite has a Path Traversal in Optimized Deps `.map` Handling
    25Monitor
  • CVE-2025-6252242 days apartvite allows server.fs.deny bypass via backslash on Windows
    24Monitor
  • CVE-2025-46565130 days apartVite's server.fs.deny bypassed with /. for files under project root
    24Monitor

Chain candidates

An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.

—

Bug bounty scope

No known public program.

Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).

Technical details

Attack conditions

  • Anyone who can reach it over the internet can trigger it.
  • No account or password is required.
  • No special conditions are required; it is repeatable.

If successful

Confidentiality
Integrity
Availability
Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
P
Scope
X

CVSS vector

CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

nvd-secondary

Root cause

A user-supplied file name is joined with the allowed directory, but the result is never checked to confirm it is still inside that directory.

A representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.

Vulnerable

ts
const file = path.join(ROOT, req.query.name);res.sendFile(file);

Fixed

ts
const file = path.resolve(ROOT, req.query.name);if (!file.startsWith(ROOT + path.sep)) {  return res.sendStatus(400);}res.sendFile(file);

Change log

  1. Fix✗ → ✓

For records you follow, these changes also arrive as notifications. →

References

All records