# CVE-2025-31486: Vite allows server.fs.deny to be bypassed with .svg or relative paths

- Priority: **Routine**
- Reason: Not severe (CVSS 5.3, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2025-04-03 · Modified: 2025-04-03
- Aliases: GHSA-xcj6-pq6g-qj4x, CGA-fg68-7pxm-f4w3, CGA-vjgq-m8vq-pppj, CGA-vqhr-p693-5ffq, CGA-w4jq-6qpg-48x8
- Record: https://cvemate.com/vulnerability/CVE-2025-31486 · JSON: https://cvemate.com/vulnerability/CVE-2025-31486/json

## Description

```text
Vite is a frontend tooling framework for javascript. The contents of arbitrary files can be returned to the browser. By adding ?.svg with ?.wasm?init or with sec-fetch-dest: script header, the server.fs.deny restriction was able to bypass. This bypass is only possible if the file is smaller than build.assetsInlineLimit (default: 4kB) and when using Vite 6.0+. Only apps explicitly exposing the Vite dev server to the network (using --host or server.host config option) are affected. This vulnerability is fixed in 4.5.12, 5.4.17, 6.0.14, 6.1.4, and 6.2.5.
```

## Signals

- CVSS: 5.3 medium (v3.1, CVE.org) CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N
- EPSS: 40.461%, percentile 98.679%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- chainguard langfuse-2-worker (Chainguard): \< 2.95.12-r26
- chainguard langfuse-fips-2-worker (Chainguard): \< 2.95.12-r28
- Npm vite (Npm): ≥ 6.2.0, \< 6.2.5 \| ≥ 6.1.0, \< 6.1.4 \| ≥ 6.0.0, \< 6.0.14 \| ≥ 5.0.0, \< 5.4.17 \| \< 4.5.12
- vitejs vite: \< 4.5.12 \| ≥ 5.0.0, \< 5.4.17 \| ≥ 6.0.0, \< 6.0.14 \| ≥ 6.1.0, \< 6.1.4 \| ≥ 6.2.0, \< 6.2.5

## References

- <https://github.com/vitejs/vite/security/advisories/GHSA-xcj6-pq6g-qj4x>
- <https://github.com/vitejs/vite/commit/62d7e81ee189d65899bb65f3263ddbd85247b647>
- <https://github.com/vitejs/vite/blob/037f801075ec35bb6e52145d659f71a23813c48f/packages/vite/src/node/plugins/asset.ts#L285-L290>
- <https://nvd.nist.gov/vuln/detail/CVE-2025-31486>
- <https://github.com/vitejs/vite>
- <https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/31xxx/CVE-2025-31486.json>

---

Data as of 2026-12-05T10:18:16.113Z. 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
