WordPress through 5.0.3 allows Path Traversal in wp_crop_image(). An attacker (who has privileges to crop an image) can write the output image to an arbitrary directory via a filename containing two image extensions and ../ sequences, such as a filename ending with the .jpg?/../../file.jpg substring.
https://github.com/SpeatX/Wordpress-Crop-RCE
https://github.com/SpeatX/WordPress-RCE-CVE-2019-8942
https://github.com/Zahid-secure/cve-walkthrough-labs
https://github.com/hadrian3689/wordpress_cropimage
https://github.com/v0lck3r/CVE-2019-8943
https://github.com/brianwrf/WordPress_4.9.8_RCE_POC
https://blog.ripstech.com/2019/wordpress-image-remote-code-execution/
http://packetstormsecurity.com/files/161213/WordPress-5.0.0-Remote-Code-Execution.html
http://packetstormsecurity.com/files/152396/WordPress-5.0.0-crop-image-Shell-Upload.html