{"id":"CVE-2025-31125","published":"2025-03-31T17:15:43Z","modified":"2026-06-17T09:09:54Z","title":"Vite Vitejs Improper Access Control Vulnerability","vendor":"Vite","product":"Vitejs","tier":"core","eol":null,"description":{"text":"Vite is a frontend tooling framework for javascript. Vite exposes content of non-allowed files using ?inline&import or ?raw?import. 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 6.2.4, 6.1.3, 6.0.13, 5.4.16, and 4.5.11.","provenance":"source","from":"NVD"},"summary":{"text":"Vite, a frontend tooling framework for JavaScript, has an improper access control flaw in its dev server that exposes the contents of files which should not be allowed to be served, via the ?inline&import or ?raw?import query parameters. An attacker can read these files over the network without authentication or user interaction, but only against applications that explicitly expose the Vite dev server to the network through the --host flag or the server.host configuration option.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-10-23T07:11:03Z"},"cvss":{"score":7.5,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","provenance":"source","from":"NVD"},"epss":{"score":0.74939,"percentile":0.99505,"date":"2026-10-30","provenance":"source"},"kev":{"dateAdded":"2026-01-22","dueDate":"2026-02-12","ransomware":false,"requiredAction":"Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.","notes":"This vulnerability could affect an open-source component, third-party library, protocol, or proprietary implementation that could be used by different products. For more information, please see: https://github.com/vitejs/vite/commit/59673137c45ac2bcfad1170d954347c1a17ab949 ; https://nvd.nist.gov/vuln/detail/CVE-2025-31125","provenance":"source"},"vulncheckKev":{"dateAdded":"2025-05-30","exploitedFirstSeen":"2025-05-30","ransomware":false,"evidence":[{"url":"https://cyble.com/blog/cyble-sensors-detects-vulnerabilities/","date":"2025-05-30"},{"url":"https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json","date":"2026-01-22"},{"url":"https://www.recordedfuture.com/blog/january-2026-cve-landscape","date":"2026-02-24"},{"url":"https://www.f5.com/labs/articles/cloud-takeover-mass-scanning-for-exposed-vite-endpoints-cve-2026-39364","date":"2026-09-11"}],"evidenceTotal":4,"provenance":"source"},"exploited":true,"otx":{"pulseCount":50,"pulses":[{"name":"Actively_Exploited_Kev | Oct 30, 2026","url":"https://otx.alienvault.com/pulse/6ae35d889ea92b4ce19c2680","created":"2026-10-29"},{"name":"Actively_Exploited_Kev | Oct 29, 2026","url":"https://otx.alienvault.com/pulse/6ae20c1db17e7057ae7d9ad1","created":"2026-10-28"},{"name":"Actively_Exploited_Kev | Oct 28, 2026","url":"https://otx.alienvault.com/pulse/6ae0ba7e0e2a97ff7b218819","created":"2026-10-27"},{"name":"Actively_Exploited_Kev | Oct 27, 2026","url":"https://otx.alienvault.com/pulse/6adf68b85c3e852f3c111d18","created":"2026-10-26"},{"name":"Actively_Exploited_Kev | Oct 24, 2026","url":"https://otx.alienvault.com/pulse/6adb740e397c3ad4799aa4cd","created":"2026-10-23"},{"name":"Actively_Exploited_Kev | Oct 23, 2026","url":"https://otx.alienvault.com/pulse/6ada236fcfba2dfa730ea482","created":"2026-10-22"},{"name":"Actively_Exploited_Kev | Oct 22, 2026","url":"https://otx.alienvault.com/pulse/6ad8d33a077cbb5cab524d80","created":"2026-10-21"},{"name":"Actively_Exploited_Kev | Oct 21, 2026","url":"https://otx.alienvault.com/pulse/6ad78130c4d1ac2be83a8b6d","created":"2026-10-20"},{"name":"Actively_Exploited_Kev | Oct 20, 2026","url":"https://otx.alienvault.com/pulse/6ad62f63c24a405a3423cc13","created":"2026-10-19"},{"name":"Actively_Exploited_Kev | Oct 19, 2026","url":"https://otx.alienvault.com/pulse/6ad4dda174e5797d0bd238b7","created":"2026-10-18"}],"provenance":"machine"},"cwes":[{"id":"CWE-200","name":"Exposure of Sensitive Information to an Unauthorized Actor"},{"id":"CWE-284","name":"Improper Access Control"}],"references":[{"url":"https://github.com/vitejs/vite/commit/59673137c45ac2bcfad1170d954347c1a17ab949","tags":["Patch"]},{"url":"https://github.com/vitejs/vite/security/advisories/GHSA-4r4m-qw57-chr8","tags":["Exploit","Vendor Advisory"]},{"url":"https://github.com/vitejs/vite/security/advisories/GHSA-4r4m-qw57-chr8","tags":["Exploit","Vendor Advisory"]},{"url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2025-31125","tags":["US Government Resource"]}],"techniques":[{"id":"T1190","name":"Exploit Public-Facing Application","tactics":["initial-access"],"provenance":"ai","basis":"ai-mapping","bases":["ai-mapping"],"basisDetail":"claude-haiku-5-5: Exploited via network-exposed dev server HTTP requests","mappingType":"exploitation_technique","evidence":[{"from":"description","quote":"Only apps explicitly exposing the Vite dev server to the network","start":132,"end":196}],"model":"claude-haiku-5-5","confidence":"medium","confidenceNote":"AI-mapped from the description (quote-validated, not expert-reviewed)"},{"id":"T1005","name":"Data from Local System","tactics":["collection"],"provenance":"ai","basis":"ai-mapping","bases":["ai-mapping"],"basisDetail":"claude-haiku-5-5: Attacker reads non-allowed local files","mappingType":"primary_impact","evidence":[{"from":"description","quote":"Vite exposes content of non-allowed files","start":53,"end":94}],"model":"claude-haiku-5-5","confidence":"medium","confidenceNote":"AI-mapped from the description (quote-validated, not expert-reviewed)"}],"reports":[],"affected":[{"ecosystem":"npm","package":"vite","vulnerableRanges":[">=6.2.0, <6.2.4",">=6.1.0, <6.1.3",">=6.0.0, <6.0.13",">=5.0.0, <5.4.16","<4.5.11"],"patched":["6.2.4","6.1.3","6.0.13","5.4.16","4.5.11"],"from":["GHSA-4r4m-qw57-chr8"],"provenance":"source"}],"advisories":[{"id":"GHSA-4r4m-qw57-chr8","url":"https://github.com/advisories/GHSA-4r4m-qw57-chr8","severity":"MODERATE","ecosystem":"npm","package":"vite","vulnerableRanges":[">=6.2.0, <6.2.4"],"patched":["6.2.4"],"provenance":"source","from":"GHSA"},{"id":"GHSA-4r4m-qw57-chr8","url":"https://github.com/advisories/GHSA-4r4m-qw57-chr8","severity":"MODERATE","ecosystem":"npm","package":"vite","vulnerableRanges":[">=6.1.0, <6.1.3"],"patched":["6.1.3"],"provenance":"source","from":"GHSA"},{"id":"GHSA-4r4m-qw57-chr8","url":"https://github.com/advisories/GHSA-4r4m-qw57-chr8","severity":"MODERATE","ecosystem":"npm","package":"vite","vulnerableRanges":[">=6.0.0, <6.0.13"],"patched":["6.0.13"],"provenance":"source","from":"GHSA"},{"id":"GHSA-4r4m-qw57-chr8","url":"https://github.com/advisories/GHSA-4r4m-qw57-chr8","severity":"MODERATE","ecosystem":"npm","package":"vite","vulnerableRanges":[">=5.0.0, <5.4.16"],"patched":["5.4.16"],"provenance":"source","from":"GHSA"},{"id":"GHSA-4r4m-qw57-chr8","url":"https://github.com/advisories/GHSA-4r4m-qw57-chr8","severity":"MODERATE","ecosystem":"npm","package":"vite","vulnerableRanges":["<4.5.11"],"patched":["4.5.11"],"provenance":"source","from":"GHSA"}],"euvd":{"id":"EUVD-2025-8866","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2025-8866","exploited":true,"exploitedSince":"2026-01-22","provenance":"source"},"exploits":[],"exploitSources":{"pocGithub":{"count":4,"skipped":0,"earliest":"2025-04-01","earliestUrl":"https://github.com/sunhuiHi666/CVE-2025-31125","repos":[{"name":"sunhuiHi666/CVE-2025-31125","url":"https://github.com/sunhuiHi666/CVE-2025-31125","stars":6,"created":"2025-04-01"},{"name":"MuhammadWaseem29/Vitejs-exploit","url":"https://github.com/MuhammadWaseem29/Vitejs-exploit","stars":0,"created":"2025-05-03"},{"name":"0xgh057r3c0n/CVE-2025-31125","url":"https://github.com/0xgh057r3c0n/CVE-2025-31125","stars":0,"created":"2025-05-07"},{"name":"harshgupptaa/Path-Transversal-CVE-2025-31125-","url":"https://github.com/harshgupptaa/Path-Transversal-CVE-2025-31125-","stars":0,"created":"2025-07-13"}]},"nuclei":[{"id":"CVE-2025-31125","name":"Vite Development Server - Path Traversal","severity":"medium","path":"http/cves/2025/CVE-2025-31125.yaml","url":"https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2025/CVE-2025-31125.yaml"}],"first":{"date":"2025-04-01","source":"PoC-in-GitHub","url":"https://github.com/sunhuiHi666/CVE-2025-31125"},"provenance":"source"},"exploitRefs":["https://github.com/vitejs/vite/security/advisories/GHSA-4r4m-qw57-chr8"],"flow":[{"stage":"exploitation","techniques":["T1190"],"provenance":"ai"},{"stage":"primary","techniques":["T1005"],"provenance":"ai"}],"timeline":[{"date":"2025-03-31","kind":"published","label":"Published (NVD)","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-31125","provenance":"source"},{"date":"2025-04-01","kind":"exploit-public","label":"First public exploit: PoC-in-GitHub","url":"https://github.com/sunhuiHi666/CVE-2025-31125","provenance":"source"},{"date":"2025-05-30","kind":"exploited-reported","label":"Exploitation first reported (VulnCheck KEV evidence)","url":"https://cyble.com/blog/cyble-sensors-detects-vulnerabilities/","provenance":"source"},{"date":"2026-01-22","kind":"kev","label":"Added to CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","provenance":"source"},{"date":"2026-01-22","kind":"euvd-exploited","label":"ENISA EUVD: exploited","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2025-8866","provenance":"source"}],"speed":{"daysToPublicExploit":1,"firstExploitFrom":"PoC-in-GitHub","daysToKev":297},"priority":{"score":68.2,"factors":[{"name":"In a KEV catalog","points":35.0,"detail":"listed in CISA KEV and VulnCheck KEV"},{"name":"Recent KEV listing","points":0.0,"detail":"added 519 days ago"},{"name":"Known ransomware use","points":0.0,"detail":"not known"},{"name":"EPSS percentile","points":19.9,"detail":"percentile 0.9950"},{"name":"Named in threat reports","points":0.0,"detail":"0 reports"},{"name":"Public exploit code","points":5.0,"detail":"1 NVD reference tagged Exploit; 4 PoC-in-GitHub repos; 1 nuclei template"},{"name":"Mentioned in OTX pulses","points":3.0,"detail":"50 pulses"},{"name":"CVSS severity","points":5.25,"detail":"base score 7.5"},{"name":"End-of-life product","points":0.0,"detail":"supported or unknown"}]},"lineage":{"familyId":"fam-vitejs-vite-cve-2022-35204","parents":[{"from":"CVE-2025-30208","to":"CVE-2025-31125","relation":"successor","confidence":"high","kind":"lineage","evidence":[{"kind":"version-step","provenance":"source","package":"npm:vite","fromFixed":"6.2.3","toFixed":"6.2.4","daysApart":7},{"kind":"version-step","provenance":"source","package":"npm:vite","fromFixed":"4.5.10","toFixed":"4.5.11","daysApart":7},{"kind":"same-code","provenance":"machine","files":["packages/vite/src/node/server/middlewares/transform.ts","playground/fs-serve/root/src/index.html"],"commits":["https://github.com/vitejs/vite/commit/315695e9d97cc6cfa7e6d9e0229fb50cdae3d9f4","https://github.com/vitejs/vite/commit/80381c38d6f068b12e6e928cd3c616bd1d64803c","https://github.com/vitejs/vite/commit/59673137c45ac2bcfad1170d954347c1a17ab949"],"basis":"shared function","functions":["transformMiddleware"]},{"kind":"similar","provenance":"machine","score":0.46,"basis":"same package + description similarity"}]},{"from":"CVE-2024-45811","to":"CVE-2025-31125","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["packages/vite/src/node/server/middlewares/transform.ts","playground/fs-serve/root/src/index.html"],"commits":["https://github.com/vitejs/vite/commit/6820bb3b9a54334f3268fc5ee1e967d2e1c0db34","https://github.com/vitejs/vite/commit/4573a6fd6f1b097fb7296a3e135e0646b996b249","https://github.com/vitejs/vite/commit/59673137c45ac2bcfad1170d954347c1a17ab949"],"basis":"shared function","functions":["transformMiddleware"]}]}],"children":[{"from":"CVE-2025-31125","to":"CVE-2025-31486","relation":"successor","confidence":"high","kind":"lineage","evidence":[{"kind":"version-step","provenance":"source","package":"npm:vite","fromFixed":"6.2.4","toFixed":"6.2.5","daysApart":3},{"kind":"version-step","provenance":"source","package":"npm:vite","fromFixed":"4.5.11","toFixed":"4.5.12","daysApart":3},{"kind":"same-code","provenance":"machine","files":["packages/vite/src/node/server/middlewares/transform.ts","playground/fs-serve/root/src/index.html"],"commits":["https://github.com/vitejs/vite/commit/59673137c45ac2bcfad1170d954347c1a17ab949","https://github.com/vitejs/vite/commit/62d7e81ee189d65899bb65f3263ddbd85247b647"],"basis":"shared function","functions":["transformMiddleware"]}]},{"from":"CVE-2025-31125","to":"CVE-2026-39364","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["packages/vite/src/node/server/middlewares/transform.ts","playground/fs-serve/root/src/index.html"],"commits":["https://github.com/vitejs/vite/commit/59673137c45ac2bcfad1170d954347c1a17ab949","https://github.com/vitejs/vite/commit/a9a3df299378d9cbc5f069e3536a369f8188c8ff"],"basis":"shared function","functions":["transformMiddleware"]}]},{"from":"CVE-2025-31125","to":"CVE-2026-39365","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["packages/vite/src/node/server/middlewares/transform.ts"],"commits":["https://github.com/vitejs/vite/commit/59673137c45ac2bcfad1170d954347c1a17ab949","https://github.com/vitejs/vite/commit/79f002f2286c03c88c7b74c511c7f9fc6dc46694"],"basis":"shared function","functions":["transformMiddleware"]}]}],"packageHistory":[{"cve":"CVE-2024-52011","published":"2026-06-01","fixed":"5.4.9","kev":false},{"cve":"CVE-2025-24010","published":"2025-01-20","fixed":"6.0.9","kev":false},{"cve":"CVE-2025-30208","published":"2025-03-24","fixed":"6.2.3","kev":false},{"cve":"CVE-2025-31125","published":"2025-03-31","fixed":"6.2.4","kev":true},{"cve":"CVE-2025-31486","published":"2025-04-03","fixed":"6.2.5","kev":false},{"cve":"CVE-2025-32395","published":"2025-04-10","fixed":"6.2.6","kev":false},{"cve":"CVE-2025-46565","published":"2025-05-01","fixed":"6.3.4","kev":false}],"package":"npm:vite"}}