# CVE-2025-58751: Vite middleware may serve files starting with the same name with the public directory

- Priority: **Routine**
- Reason: Not severe (CVSS 2.3, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2025-09-08 · Modified: 2025-09-09
- Aliases: CGA-292x-5hf8-gqg9, CGA-5m4m-26vf-4898, CGA-6r8r-w3p6-qg2w, CGA-9p47-grgp-jj6p, CGA-f5h5-qh37-rc95, CGA-mgpw-5p63-7mp4, CGA-mr37-h7f7-6c3x, CGA-p457-724r-x2qh, CGA-rrx5-rv5f-fx8w, GHSA-g4jq-h2w9-997c, CGA-27c2-28fq-rcgp, CGA-2whg-7924-h55f, CGA-62gm-r7rh-6rp4, CGA-684v-54hh-fx2c, CGA-7jqg-vw6j-9x4m, CGA-7r9r-vhmh-vhfm, CGA-9jw3-p8f2-6h3x, CGA-c8mw-xpgq-6w7r, CGA-cg5h-x27r-rfg4, CGA-f7xf-mgmw-h43f, CGA-ggc5-5hvx-w845, CGA-h9xg-j5w8-8hr5, CGA-jpgg-r3f6-p4xw, CGA-mwq5-8479-4h83, CGA-qjv4-fxvx-g7v3, CGA-w9qv-6fmg-vcc4
- Record: https://cvemate.com/vulnerability/CVE-2025-58751 · JSON: https://cvemate.com/vulnerability/CVE-2025-58751/json

## Description

```text
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.
```

## Signals

- CVSS: 5.3 medium (v3.1, NVD) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
- EPSS: 1.418%, percentile 73.724%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 1 (github)

## Affected

- chainguard gitlab-rails-ce-18.1 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-fips-18.1 (Chainguard): All versions (No fix recorded)
- chainguard langfuse-2-worker (Chainguard): \< 2.95.12-r26
- chainguard langfuse-3-compat (Chainguard): \< 3.225.7-r6
- chainguard langfuse-3-worker (Chainguard): \< 3.179.1-r3
- chainguard langfuse-fips-2-worker (Chainguard): \< 2.95.12-r28
- chainguard langfuse-fips-3-worker (Chainguard): \< 3.179.1-r2
- chainguard vitess-21 (Chainguard): All versions (No fix recorded)
- chainguard vitess-22 (Chainguard): \< 22.0.1-r7 \| \< 22.0.2-r0
- chainguard vitess-23 (Chainguard): \< 23.0.0-r2
- chainguard vitess-23-binaries (Chainguard): \< 23.0.0-r2
- chainguard vitess-23-compat (Chainguard): \< 23.0.0-r2
- wolfi langfuse-3-compat (Wolfi): \< 3.225.7-r6
- wolfi langfuse-3-worker (Wolfi): \< 3.179.1-r3
- wolfi vitess-23 (Wolfi): \< 23.0.0-r2
- wolfi vitess-23-binaries (Wolfi): \< 23.0.0-r2
- wolfi vitess-23-compat (Wolfi): \< 23.0.0-r2
- Npm vite (Npm): ≥ 7.1.0, \< 7.1.5 \| ≥ 7.0.0, \< 7.0.7 \| ≥ 6.0.0, \< 6.3.6 \| \< 5.4.20
- vitejs vite: \< 5.4.20 \| ≥ 6.0.0, \< 6.3.6 \| ≥ 7.0.0, \< 7.0.7 \| ≥ 7.1.0, \< 7.1.5

## References

- <https://github.com/vitejs/vite/security/advisories/GHSA-g4jq-h2w9-997c>
- <https://github.com/lukeed/sirv/commit/f0113f3f8266328d804ee808f763a3c11f8997eb>
- <https://github.com/vitejs/vite/commit/09f2b52e8d5907f26602653caf41b3a56692600d>
- <https://github.com/vitejs/vite/commit/4f1c35bcbb5830290c694aa14b6789e07450f069>
- <https://github.com/vitejs/vite/commit/63e2a5d232218f3f8d852056751e609a5367aaec>
- <https://github.com/vitejs/vite/commit/e11d24008b97d4ca731ecc1a3b95260a6d12e7e0>
- <https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/58xxx/CVE-2025-58751.json>
- <https://nvd.nist.gov/vuln/detail/CVE-2025-58751>
- <https://github.com/vitejs/vite>

---

Data as of 2026-12-05T08:15:41.021Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
