id: office365-open-redirect

info:
  name: Office365 Autodiscover - Open Redirect
  author: dhiyaneshDk
  severity: medium
  description: Office365 Autodiscover contains an open redirect vulnerability. An attacker can redirect a user to a malicious site and possibly obtain sensitive information, modify data, and/or execute unauthorized operations.
  remediation: See the workaround detailed in the Medium post in the references.
  reference:
    - https://medium.com/@heinjame/office365-open-redirect-from-autodiscover-64284d26c168
  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
  metadata:
    max-request: 1
  tags: redirect,office365,microsoft,misconfig,intrusive,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/autodiscover/autodiscover.json/v1.0/{{randstr}}@interact.sh?Protocol=Autodiscoverv1"

    matchers-condition: and
    matchers:
      - type: word
        part: header
        words:
          - "autodiscover.interact.sh"

      - type: status
        status:
          - 302
# digest: 490a0046304402201bf711ad67420018d0dc9a15297073dd2f5dda11619eecea32f844d16f709af202207d47b5f66723e88bfb48c4f180e23e5e7a50364efa7a4f03b5e8d77908b0c29c:922c64590222798bb761d5b6d8e72950