id: icewarp-open-redirect

info:
  name: IceWarp - Open Redirect
  author: uomogrande
  severity: medium
  description: IceWarp open redirect vulnerabilities were detected. An attacker can redirect a user to a malicious site and possibly obtain sensitive information, modify data, and/or execute unauthorized operations.
  remediation: Fixed in 13.0.2.4.
  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
    cwe-id: CWE-601
    cpe: cpe:2.3:a:icewarp:icewarp:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    shodan-query: title:"icewarp"
    product: icewarp
    vendor: icewarp
  tags: icewarp,redirect

http:
  - method: GET
    path:
      - "{{BaseURL}}///interact.sh/%2F.."

    matchers-condition: and
    matchers:
      - type: word
        part: header
        words:
          - 'IceWarp'

      - type: regex
        part: header
        regex:
          - '(?m)^(?:Location\s*?:\s*?)(?:https?:\/\/|\/\/|\/\\\\|\/\\)(?:[a-zA-Z0-9\-_\.@]*)interact\.sh\/?(\/|[^.].*)?$' # https://regex101.com/r/L403F0/1

    extractors:
      - type: regex
        name: redirected
        part: header
        group: 1
        regex:
          - 'Server: (.{4,20})'
# digest: 4a0a004730450221008ef024bccb48b97e0a3d4c63a93267e87cf07a2f939f89ded374041756ce8b4b02204e2a78c1f7b9460130e10598e8aa655891c1445a4d357e68d73f8da5c755b366:922c64590222798bb761d5b6d8e72950