id: wp-touch-redirect

info:
  name: WordPress WPtouch 3.7.5 - Open Redirect
  author: r3Y3r53
  severity: medium
  description: |
    WordPress WPtouch 3.7.5 is affected by an Open Redirect issue.
  reference:
    - https://packetstormsecurity.com/files/170568/WordPress-WPtouch-3.7.5-Open-Redirection.html
  classification:
    cpe: cpe:2.3:a:bravenewcode:wptouch:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: bravenewcode
    product: wptouch
    google-query: "inurl:/wp-content/plugins/wptouch"
  tags: wp-plugin,wp,packetstorm,wptouch,unauth,redirect,wordpress,vuln

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

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