{"answers":{"affected":"10 open source packages ship an affected version, including vite.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-31486 exists.","fix":"Upgrade vite to a fixed version for your release line: 4.5.12, 5.4.17, 6.0.14 or 6.1.4.","what":"CVE-2025-31486 is a medium-severity path traversal vulnerability in vitejs vite, published on 3 Apr 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2025-31486 and fix it if it is affected.\n\nWhat it is: CVE-2025-31486 is a medium-severity path traversal vulnerability in vitejs vite, published on 3 Apr 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-31486 exists.\n\nAffected packages and fixed versions:\n- vite (npm): affected all versions; fixed in 4.5.12\n- vite (npm): affected all versions; fixed in 4.5.12\n- vite (npm): affected from 5.0.0; fixed in 5.4.17\n- vite (npm): affected from 5.0.0; fixed in 5.4.17\n- vite (npm): affected from 6.0.0; fixed in 6.0.14\n- vite (npm): affected from 6.0.0; fixed in 6.0.14\n- vite (npm): affected from 6.1.0; fixed in 6.1.4\n- vite (npm): affected from 6.1.0; fixed in 6.1.4\n- vite (npm): affected from 6.2.0; fixed in 6.2.5\n- vite (npm): affected from 6.2.0; fixed in 6.2.5\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2025-31486/ (Markdown: https://insights.sbomify.com/CVE-2025-31486/index.md)","id":"CVE-2025-31486","markdown":"https://insights.sbomify.com/CVE-2025-31486/index.md","name":"CVE-2025-31486","record":{"aliases":["CLSA-2026-1791666893","GHSA-xcj6-pq6g-qj4x","MINI-qw4g-pxqc-7pgp"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["data_read"],"network_reachable":"yes","non_default_config":true,"product_category":"Vite frontend tooling","requires_auth":"none","summary":"Attackers can bypass file access restrictions to read arbitrary files if the Vite dev server is exposed to the network.","user_interaction":"required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":5.3,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-284","name":"Improper Access Control"},{"id":"CWE-200","name":"Exposure of Sensitive Information to an Unauthorized Actor"}],"description":"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.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":"2025-04-07","github_poc":3,"max_poc_stars":6,"metasploit":0,"nuclei":1,"refs":[{"date":"2025-04-07T08:56:22Z","kind":"github_poc","ref":"https://github.com/iSee857/CVE-2025-31486-PoC","stars":6,"title":"Vite任意文件读取漏洞批量检测脚本CVE-2025-31486"},{"date":"2025-04-26T01:43:29Z","kind":"github_poc","ref":"https://github.com/ll104567/CVE-2025-31486","stars":0,"title":"CVE-2025-31486 poc"},{"date":"2025-07-24T19:31:38Z","kind":"github_poc","ref":"https://github.com/hackmelocal/CVE-2025-31486-Simulation","stars":0,"title":null},{"date":null,"kind":"nuclei","ref":"http/cves/2025/CVE-2025-31486.yaml","stars":null,"title":"Vite server.fs.deny Bypass - Local File Inclusion"}],"tier":"weaponised"},"has_fix":true,"headline":"Vite allows server.fs.deny to be bypassed with .svg or relative paths","id":"CVE-2025-31486","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"path_traversal","year":"2025"},"n_packages":10,"n_references":3,"next":{"headline":"The XWiki JIRA extension allows data leak through an XXE attack by using a fake JIRA server","id":"CVE-2025-31487"},"packages":[{"ecosystem":"npm","fixed":["4.5.12"],"introduced":["0"],"last_affected":[],"package":"vite","purl":null,"source":"GHSA-xcj6-pq6g-qj4x"},{"ecosystem":"npm","fixed":["4.5.12"],"introduced":["0"],"last_affected":[],"package":"vite","purl":"pkg:npm/vite","source":"GHSA-xcj6-pq6g-qj4x"},{"ecosystem":"npm","fixed":["5.4.17"],"introduced":["5.0.0"],"last_affected":[],"package":"vite","purl":null,"source":"GHSA-xcj6-pq6g-qj4x"},{"ecosystem":"npm","fixed":["5.4.17"],"introduced":["5.0.0"],"last_affected":[],"package":"vite","purl":"pkg:npm/vite","source":"GHSA-xcj6-pq6g-qj4x"},{"ecosystem":"npm","fixed":["6.0.14"],"introduced":["6.0.0"],"last_affected":[],"package":"vite","purl":null,"source":"GHSA-xcj6-pq6g-qj4x"},{"ecosystem":"npm","fixed":["6.0.14"],"introduced":["6.0.0"],"last_affected":[],"package":"vite","purl":"pkg:npm/vite","source":"GHSA-xcj6-pq6g-qj4x"},{"ecosystem":"npm","fixed":["6.1.4"],"introduced":["6.1.0"],"last_affected":[],"package":"vite","purl":null,"source":"GHSA-xcj6-pq6g-qj4x"},{"ecosystem":"npm","fixed":["6.1.4"],"introduced":["6.1.0"],"last_affected":[],"package":"vite","purl":"pkg:npm/vite","source":"GHSA-xcj6-pq6g-qj4x"},{"ecosystem":"npm","fixed":["6.2.5"],"introduced":["6.2.0"],"last_affected":[],"package":"vite","purl":null,"source":"GHSA-xcj6-pq6g-qj4x"},{"ecosystem":"npm","fixed":["6.2.5"],"introduced":["6.2.0"],"last_affected":[],"package":"vite","purl":"pkg:npm/vite","source":"GHSA-xcj6-pq6g-qj4x"}],"prev":{"headline":"GraphQL grant on a property might be cached with different objects","id":"CVE-2025-31485"},"products":["vite"],"published":"2025-04-03","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"attribution","licence":"MIT","name":"Nuclei templates"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-04-03","vendors":["vitejs"]},"summary":"Attackers can bypass file access restrictions to read arbitrary files if the Vite dev server is exposed to the network.","url":"https://insights.sbomify.com/CVE-2025-31486/"}