id: limesurvey-open-redirect

info:
  name: LimeSurvey - Open Redirect via editorLink
  author: Melvin Lammerts
  severity: medium
  description: |
    LimeSurvey before 6.16.11 contains an open redirect vulnerability in the editorLink route. An attacker can craft a URL that redirects users to an arbitrary external site, potentially enabling phishing attacks.
  reference:
    - https://github.com/LimeSurvey/LimeSurvey/pull/4727
  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:
    verified: true
    max-request: 1
    vendor: limesurvey
    product: limesurvey
  tags: limesurvey,redirect,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/index.php?r=editorLink&url=http://interact.sh/"

    matchers-condition: and
    matchers:
      - type: regex
        part: header
        regex:
          - '(?m)^(?:Location\s*?:\s*?)(?:https?://|//)(?:[a-zA-Z0-9\-_\.@]*)interact\.sh.*$'

      - type: word
        part: header
        words:
          - 'LS_AUTH_INIT'

      - type: status
        status:
          - 302
# digest: 4a0a00473045022062ce4e2af5af00981890b96c4f667c3ec0dbe2eb80da02b433458fa5033a6c63022100a81ebc68484357f8ef61a3a89d7c4383f4c3c94e4d81c222904864a97d495852:922c64590222798bb761d5b6d8e72950