Vite
Vite has a `server.fs.deny` bypassed for `inline` and `raw` with `?import` query
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.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 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
Fixed in 6.2.4, 6.1.3, 6.0.13, 5.4.16, 4.5.11
Mitigation
Upgrade vite to 6.2.4 or 6.1.3 or 6.0.13 or 5.4.16 or 4.5.11 or later.
References
Timeline
Days relative to CVE publicationFirst public PoC 21 h after publication; added to CISA KEV 297 days after publication. First PoC: sunhuiHi666/CVE-2025-31125 (created 1 Apr 2025, found by us: backfilled).
PoC repositories
Found on GitHub.8 PoCs · 2 pending · 1 suspicious or fake
PoCs 8
| Repository | Created | Found by us | Stars | Assessment |
|---|---|---|---|---|
| xuemian168/CVE-2025-30208 | 26 Mar 2025 −5.3 d | backfilled | 50 | Scanner |
| jackieya/ViteVulScan | 31 Mar 2025 −3 h | backfilled | 7 | PoC older repo: PoC date unknown, not used for the first PoC |
| sunhuiHi666/CVE-2025-31125 | 1 Apr 2025 +21 h | backfilled | 6 | PoC |
| MuhammadWaseem29/Vitejs-exploit | 3 May 2025 +33 d | backfilled | 0 | PoC |
| 0xgh057r3c0n/CVE-2025-31125 | 7 May 2025 +37 d | backfilled | 0 | PoC |
| TehanG07/Vitejs-exploit | 17 May 2025 +47 d | backfilled | 1 | PoC |
| harshgupptaa/Path-Transversal-CVE-2025-31125- | 13 Jul 2025 +104 d | backfilled | 0 | PoC |
| L15B04/Exploit-VITE-CVE-2025-30208-CVE-2025-31125 | 18 Oct 2026 +1.5 y | 14 Nov 2026 | 2 | PoC |
Pending 2
| Repository | Created | Found by us | Stars | Assessment |
|---|---|---|---|---|
| alinaclark672377250/Vitejs-exploit | 18 Nov 2026 +1.6 y | 18 Nov 2026 | 0 | Pending · listed by PoC Index; via PoC Index |
| nak000/Vitejs-exploit-CVE-2025-31125-rce | unknown | backfilled | 0 | Pending · repository unavailable (HTTP 404) |
Suspicious or fake 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| khadafigans/Vite-Exploit | 12 Sep 2025 +165 d | 3 | Fake |
Only PoCs count toward the first-PoC date and the characteristics below. "Backfilled" means we found the repository more than 30 days after it was created. Do not run PoC code from unknown sources.
Other public exploits
Exploit-DB, Metasploit and nuclei count as public PoCs. Exploit-tagged references from the CVE record and NVD are links only. None of these are analysed by us.| Source | Title | Published | Found by us |
|---|---|---|---|
| nuclei template | nuclei template: Vite Development Server - Path Traversal | 28 Apr 2025 | 14 Nov 2026 |
PoC characteristics
What to hunt for in your logs · from 8 PoC reposGET /@fs/etc/passwd
- Query
import=?inline=1.wasm?initinline=1.wasm?initraw??- Ports
- 80, 443, 3000, 5173, 8080
- Seen in
- 2 repos: 0xgh057r3c0n/CVE-2025-31125, xuemian168/CVE-2025-30208
- Evidence
- 0xgh057r3c0n/CVE-2025-31125/CVE-2025-31125.yaml:35 xuemian168/CVE-2025-30208/main.py:158 xuemian168/CVE-2025-30208/main.py:165-167 xuemian168/CVE-2025-30208/main.py:160
GET /@fs/%252e%252e/%252e%252e/%252e%252e/etc/passwd
- Query
import=?inline=1.wasm?init- Seen in
- 1 repo: 0xgh057r3c0n/CVE-2025-31125
- Evidence
- 0xgh057r3c0n/CVE-2025-31125/CVE-2025-31125.yaml:43
GET /@fs/../../../../../../../etc/passwd
- Query
import=?inline=1.wasm?init- Seen in
- 1 repo: 0xgh057r3c0n/CVE-2025-31125
- Evidence
- 0xgh057r3c0n/CVE-2025-31125/CVE-2025-31125.yaml:39
GET /@fs/C:/windows/win.ini
- Query
import=?inline=1.wasm?init- Seen in
- 1 repo: 0xgh057r3c0n/CVE-2025-31125
- Evidence
- 0xgh057r3c0n/CVE-2025-31125/CVE-2025-31125.yaml:31
GET /win.ini
- Query
import=inline=1.wasm?initraw??- Ports
- 80, 443, 3000, 5173, 8080
- Seen in
- 1 repo: xuemian168/CVE-2025-30208
- Evidence
- xuemian168/CVE-2025-30208/main.py:159 xuemian168/CVE-2025-30208/main.py:165-167 xuemian168/CVE-2025-30208/main.py:161
GET /{var}
- Query
raw- Ports
- 80, 443, 3000, 5173, 8080
- Seen in
- 1 repo: xuemian168/CVE-2025-30208
- Evidence
- xuemian168/CVE-2025-30208/manual.py:121-127 xuemian168/CVE-2025-30208/manual.py:249-250
Regex
Generated from PoC characteristics; not yet reviewed. Matches the request path and query.
(?i)^/@fs/etc/passwd\?(?:.*&)?import=.*\?inline=1\.wasm\?init.*inline=1\.wasm\?init.*raw\?\?
(?i)^/@fs/%252e%252e/%252e%252e/%252e%252e/etc/passwd\?(?:.*&)?import=.*\?inline=1\.wasm\?init
(?i)^/@fs/\.\./\.\./\.\./\.\./\.\./\.\./\.\./etc/passwd\?(?:.*&)?import=.*\?inline=1\.wasm\?init
(?i)^/@fs/C:/windows/win\.ini\?(?:.*&)?import=.*\?inline=1\.wasm\?init
(?i)^/win\.ini\?(?:.*&)?import=.*inline=1\.wasm\?init.*raw\?\?
Suricata
Template generated from PoC characteristics. Review before deploying.
alert http any any -> $HOME_NET [80,443,3000,5173,8080] (msg:"GG PoC-Monitor CVE-2025-31125 vitejs vite exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/@fs/etc/passwd"; http.uri; content:"import="; http.uri; content:"?inline=1.wasm?init"; http.uri; content:"inline=1.wasm?init"; http.uri; content:"raw??"; reference:url,poc.griffinguard.io/cve/CVE-2025-31125; classtype:web-application-attack; sid:9853238; rev:1;)
alert http any any -> $HOME_NET any (msg:"GG PoC-Monitor CVE-2025-31125 vitejs vite exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/@fs/%252e%252e/%252e%252e/%252e%252e/etc/passwd"; http.uri; content:"import="; http.uri; content:"?inline=1.wasm?init"; reference:url,poc.griffinguard.io/cve/CVE-2025-31125; classtype:web-application-attack; sid:9518257; rev:1;)
alert http any any -> $HOME_NET any (msg:"GG PoC-Monitor CVE-2025-31125 vitejs vite exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/@fs/../../../../../../../etc/passwd"; http.uri; content:"import="; http.uri; content:"?inline=1.wasm?init"; reference:url,poc.griffinguard.io/cve/CVE-2025-31125; classtype:web-application-attack; sid:9609555; rev:1;)
alert http any any -> $HOME_NET any (msg:"GG PoC-Monitor CVE-2025-31125 vitejs vite exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/@fs/C:/windows/win.ini"; http.uri; content:"import="; http.uri; content:"?inline=1.wasm?init"; reference:url,poc.griffinguard.io/cve/CVE-2025-31125; classtype:web-application-attack; sid:9286525; rev:1;)
alert http any any -> $HOME_NET [80,443,3000,5173,8080] (msg:"GG PoC-Monitor CVE-2025-31125 vitejs vite exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/win.ini"; http.uri; content:"import="; http.uri; content:"inline=1.wasm?init"; http.uri; content:"raw??"; reference:url,poc.griffinguard.io/cve/CVE-2025-31125; classtype:web-application-attack; sid:9793603; rev:1;)
Sigma
Template generated from PoC characteristics. Review before deploying.
title: vitejs vite exploit attempt (CVE-2025-31125)
id: gg-pocmon-cve-2025-31125-9853238
status: experimental
description: Request pattern taken from public PoCs for CVE-2025-31125. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2025-31125
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/@fs/etc/passwd'
cs-uri-query|contains|all:
- 'import='
- '?inline=1.wasm?init'
- 'inline=1.wasm?init'
- 'raw??'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2025.31125
title: vitejs vite exploit attempt (CVE-2025-31125)
id: gg-pocmon-cve-2025-31125-9518257
status: experimental
description: Request pattern taken from public PoCs for CVE-2025-31125. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2025-31125
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/@fs/%252e%252e/%252e%252e/%252e%252e/etc/passwd'
cs-uri-query|contains|all:
- 'import='
- '?inline=1.wasm?init'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2025.31125
title: vitejs vite exploit attempt (CVE-2025-31125)
id: gg-pocmon-cve-2025-31125-9609555
status: experimental
description: Request pattern taken from public PoCs for CVE-2025-31125. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2025-31125
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/@fs/../../../../../../../etc/passwd'
cs-uri-query|contains|all:
- 'import='
- '?inline=1.wasm?init'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2025.31125
title: vitejs vite exploit attempt (CVE-2025-31125)
id: gg-pocmon-cve-2025-31125-9286525
status: experimental
description: Request pattern taken from public PoCs for CVE-2025-31125. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2025-31125
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/@fs/C:/windows/win.ini'
cs-uri-query|contains|all:
- 'import='
- '?inline=1.wasm?init'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2025.31125
title: vitejs vite exploit attempt (CVE-2025-31125)
id: gg-pocmon-cve-2025-31125-9793603
status: experimental
description: Request pattern taken from public PoCs for CVE-2025-31125. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2025-31125
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/win.ini'
cs-uri-query|contains|all:
- 'import='
- 'inline=1.wasm?init'
- 'raw??'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2025.31125