Skip to content
Fencer Vulns
medium 5.3

CVE-2025-31486 json

Vite allows server.fs.deny to be bypassed with .svg or relative paths

published 2025-04-03 19 mo ago modified 2026-09-10 1 mo ago also EUVD-2025-9734 , GHSA-xcj6-pq6g-qj4x

cvss
5.3
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
40.5%
EPSS 40.5% chance of exploitation in 30 days, percentile 98%
public exploits
0
none known, plus a Nuclei check

Summary

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.

Patch / fix

  • npm vite 4.5.12, 5.4.17, 6.0.14, 6.1.4, 6.2.5
  • vitejs vite 4.5.12, 5.4.17, 6.0.14, 6.1.4, 6.2.5

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2025-31486 updated cvss 5.3

vite: Vite allows server.fs.deny to be bypassed with .svg or relative paths

  • Red Hat Ansible Automation Platform 2 automation-gateway, automation-controller, automation-eda-controller Red Hat JBoss Enterprise Application Platform 8 org.keycloak-keycloak-parent Red Hat JBoss Enterprise Application Platform Expansion Pack org.keycloak-keycloak-parent Red Hat OpenShift distributed tracing 3 rhosdt/tempo-rhel8, rhosdt/tempo-query-rhel8, rhosdt/tempo-gateway-rhel8, rhosdt/tempo-rhel8-operator, rhosdt/tempo-gateway-opa-rhel8, rhosdt/tempo-jaeger-query-rhel8
    affected: no fix available “Fix deferred”

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
Proof of concept is public
Automatable
no
Technical impact
partial
Assessed
19 mo ago

Exploit prediction

40.46% chance of exploitation in the next 30 days, higher than 98% of all scored CVEs (FIRST EPSS, 2026-11-08).

Exploits and checks

  • Nuclei template Vite server.fs.deny Bypass - Local File Inclusion nuclei detection template
  • github.com https://github.com/vitejs/vite/security/advisories/GHSA-xcj6-pq6g-qj4x referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
CNA 3.1 5.3 CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N
GitHub 3.1 5.3 CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N

Affected packages

ecosystem package affected fixed in
npm vite
>=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
6.2.5
6.1.4
6.0.14
5.4.17
4.5.12

Affected products

  • vitejs vite

Classification

Weakness
  • CWE-200 Exposure of Sensitive Information to an Unauthorized Actor
  • CWE-284 Improper Access Control

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.

CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.