id: wptouch-open-redirect

info:
  name: WordPress WPtouch 3.x - Open Redirect
  author: 0x_Akoko
  severity: medium
  description: |
    WordPress WPtouch plugin 3.x contains an open redirect vulnerability. The plugin fails to properly sanitize user-supplied input. An attacker can redirect a user to a malicious site and possibly obtain sensitive information, modify data, and/or execute unauthorized operations.
  reference:
    - https://cxsecurity.com/issue/WLB-2020030114
  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: wp-plugin,redirect,wordpress

http:
  - method: GET
    path:
      - "{{BaseURL}}/?wptouch_switch=desktop&redirect=https://interact.sh/"

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