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