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,vuln

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: 4a0a0047304502204ba2e66a8a4ac23d7f303d20b58aaf58c23fda34dc25277b7e3a4111d7443c77022100ed5f004f24151f6e983c70765afcddf9da600a629261ffef725b5e526f232505:922c64590222798bb761d5b6d8e72950