Bug 2357264 (CVE-2025-31486)

Summary: CVE-2025-31486 vite: Vite allows server.fs.deny to be bypassed with .svg or relative paths
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: asoldano, bbaranow, bmaxwell, brian.stansberry, brking, cdewolf, darran.lofthouse, dkreling, dosoudil, fjuma, haoli, hkataria, istudens, ivassile, iweiss, jajackso, jcammara, jmitchel, jneedle, jwong, kegrant, koliveir, kshier, lgao, mabashia, mosmerov, msochure, msvehla, mwringe, nwallace, pbraun, pesilva, pjindal, pmackay, rstancel, shvarugh, simaishi, smaestri, smcdonal, stcannon, teagle, tfister, thavo, tom.jenkinson, ttakamiy, yguenane
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
A flaw was discovered in the Vite frontend framework for JavaScript. In affected versions, it is possible for arbitrary files to be returned to the browser via a specially-crafter header. Only apps explicitly exposing the Vite dev server to the network using `--host` or `server.host config option` are affected.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description OSIDB Bzimport 2025-04-03 19:01:20 UTC
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.