id: pieregister-open-redirect

info:
  name: WordPress Pie Register < 3.7.2.4 - Open Redirect
  author: 0x_Akoko
  severity: low
  description: WordPress Pie Register < 3.7.2.4 is susceptible to an open redirect vulnerability because the plugin passes unvalidated user input to the wp_redirect() function.
  reference:
    - https://wpscan.com/vulnerability/f6efa32f-51df-44b4-bbba-e67ed5785dd4
    - https://wordpress.org/plugins/pie-register/
  classification:
    cwe-id: CWE-601
  metadata:
    max-request: 1
  tags: redirect,wp-plugin,pieregister,wpscan,wordpress

http:
  - method: GET
    path:
      - "{{BaseURL}}/?piereg_logout_url=true&redirect_to=https://interact.sh"

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

# digest: 4a0a00473045022100b95440752d613f06556a442f526f8962fb0299e4a01e363a20db9cc898704751022054ef973002b686af314f89713dab20e86842e98deb31fc93f5575ebd864463e3:922c64590222798bb761d5b6d8e72950
