{"id":"CVE-2025-30208","aliases":["CVE-2025-30208","GHSA-x574-m823-4x7w"],"related":[],"kind":"vulnerability","state":"published","title":"Vite bypasses server.fs.deny when using `?raw??`","summary":"Vite, a provider of frontend development tooling, has a vulnerability in versions prior to 6.2.3, 6.1.2, 6.0.12, 5.4.15, and 4.5.10. `@fs` denies access to files outside of Vite serving allow list. Adding `?raw??` or `?import&raw??` to the URL bypasses this limitation and returns the file content if it exists. This bypass exists because trailing separators such as `?` are removed in several places, but are not accounted for in query string regexes. The contents of arbitrary files can be returned to the browser. Only apps explicitly exposing the Vite dev server to the network (using `--host` or `server.host` config option) are affected. Versions 6.2.3, 6.1.2, 6.0.12, 5.4.15, and 4.5.10 fix the issue.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Vite, a provider of frontend development tooling, has a vulnerability in versions prior to 6.2.3, 6.1.2, 6.0.12, 5.4.15, and 4.5.10. `@fs` denies access to files outside of Vite serving allow list. Adding `?raw??` or `?import&raw??` to the URL bypasses this limitation and returns the file content if it exists. This bypass exists because trailing separators such as `?` are removed in several places, but are not accounted for in query string regexes. The contents of arbitrary files can be returned to the browser. Only apps explicitly exposing the Vite dev server to the network (using `--host` or `server.host` config option) are affected. Versions 6.2.3, 6.1.2, 6.0.12, 5.4.15, and 4.5.10 fix the issue.","source":"cvelist"},{"lang":"en","text":"### Summary\nThe contents of arbitrary files can be returned to the browser.\n\n### Impact\nOnly apps explicitly exposing the Vite dev server to the network (using `--host` or [`server.host` config option](https://vitejs.dev/config/server-options.html#server-host)) are affected.\n\n### Details\n`@fs` denies access to files outside of Vite serving allow list. Adding `?raw??` or `?import&raw??` to the URL bypasses this limitation and returns the file content if it exists. This bypass exists because trailing separators such as `?` are removed in several places, but are not accounted for in query string regexes.\n\n### PoC\n```bash\n$ npm create vite@latest\n$ cd vite-project/\n$ npm install\n$ npm run dev\n\n$ echo \"top secret content\" > /tmp/secret.txt\n\n# expected behaviour\n$ curl \"http://localhost:5173/@fs/tmp/secret.txt\"\n\n    <body>\n      <h1>403 Restricted</h1>\n      <p>The request url &quot;/tmp/secret.txt&quot; is outside of Vite serving allow list.\n\n# security bypassed\n$ curl \"http://localhost:5173/@fs/tmp/secret.txt?import&raw??\"\nexport default \"top secret content\\n\"\n//# sourceMappingURL=data:application/json;base64,eyJ2...\n```","format":"markdown","source":"ghsa"},{"lang":"es","text":"Vite, un proveedor de herramientas de desarrollo frontend, presenta una vulnerabilidad en versiones anteriores a 6.2.3, 6.1.2, 6.0.12, 5.4.15 y 4.5.10. `@fs` deniega el acceso a archivos fuera de la lista de permitidos del servidor Vite. Añadir `?raw??` o `?import&amp;raw??` a la URL evita esta limitación y devuelve el contenido del archivo, si existe. Esta omisión se debe a que los separadores finales, como `?`, se eliminan en varios lugares, pero no se tienen en cuenta en las expresiones regulares de las cadenas de consulta. El contenido de archivos arbitrarios puede devolverse al navegador. Solo las aplicaciones que exponen explícitamente el servidor de desarrollo de Vite a la red (mediante la opción de configuración `--host` o `server.host`) se ven afectadas. Las versiones 6.2.3, 6.1.2, 6.0.12, 5.4.15 y 4.5.10 solucionan el problema.","source":"nvd"}],"published":"2025-03-24T17:03:40.728Z","modified":"2026-09-10T03:50:23.379Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"}],"cwes":["CWE-200","CWE-284"],"affected":[{"ranges":[{"version":"< 4.5.10","status":"affected"},{"version":">= 5.0.0, < 5.4.15","status":"affected"},{"version":">= 6.0.0, < 6.0.12","status":"affected"},{"version":">= 6.1.0, < 6.1.2","status":"affected"},{"version":">= 6.2.0, < 6.2.3","status":"affected"}],"vendor":"vitejs","product":"vite","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"6.2.0","status":"affected","fixed":"6.2.3"}],"ecosystem":"npm","package":"vite","purl":"pkg:npm/vite","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"6.1.0","status":"affected","fixed":"6.1.2"}],"ecosystem":"npm","package":"vite","purl":"pkg:npm/vite","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"6.0.0","status":"affected","fixed":"6.0.12"}],"ecosystem":"npm","package":"vite","purl":"pkg:npm/vite","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"5.0.0","status":"affected","fixed":"5.4.15"}],"ecosystem":"npm","package":"vite","purl":"pkg:npm/vite","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"4.5.10"}],"ecosystem":"npm","package":"vite","purl":"pkg:npm/vite","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"4.5.10"},{"status":"affected","introduced":"5.0.0","fixed":"5.4.15"},{"status":"affected","introduced":"6.0.0","fixed":"6.0.12"},{"status":"affected","introduced":"6.1.0","fixed":"6.1.2"},{"status":"affected","introduced":"6.2.0","fixed":"6.2.3"}],"vendor":"vitejs","product":"vite","cpe":"cpe:2.3:a:vitejs:vite:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/vitejs/vite/security/advisories/GHSA-x574-m823-4x7w","tags":["exploit","third-party-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/vitejs/vite/commit/315695e9d97cc6cfa7e6d9e0229fb50cdae3d9f4","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/vitejs/vite/commit/80381c38d6f068b12e6e928cd3c616bd1d64803c","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/vitejs/vite/commit/807d7f06d33ab49c48a2a3501da3eea1906c0d41","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/vitejs/vite/commit/92ca12dc79118bf66f2b32ff81ed09e0d0bd07ca","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/vitejs/vite/commit/f234b5744d8b74c95535a7b82cc88ed2144263c1","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-30208","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/vitejs/vite","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2025-03-24T17:40:42.736Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-30208","url":"https://www.cve.org/CVERecord?id=CVE-2025-30208","licence":"CVE Terms of Use","modified":"2025-03-24T17:46:37.205Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-x574-m823-4x7w","url":"https://github.com/advisories/GHSA-x574-m823-4x7w","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:23.379Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-30208","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-30208","licence":"Public domain","modified":"2026-06-17T09:08:21.517Z"}],"updatedAt":"2026-11-25T22:58:55.473Z","epss":{"score":0.74771,"percentile":0.99507,"date":"2026-12-01T12:00:22.000Z"}}