WordPress before 4.9.9 and 5.x before 5.0.1 allows remote code execution because an _wp_attached_file Post Meta entry can be changed to an arbitrary string, such as one ending with a .jpg?file.php substring. An attacker with author privileges can execute arbitrary code by uploading a crafted image containing PHP code in the Exif metadata. Exploitation can leverage CVE-2019-8943.
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/nguyenmanhthinbsl/CVE2019_8942
https://github.com/v0lck3r/CVE-2019-8943
https://github.com/brianwrf/WordPress_4.9.8_RCE_POC
https://lists.debian.org/debian-lts-announce/2019/03/msg00044.html
https://blog.ripstech.com/2019/wordpress-image-remote-code-execution/
http://packetstormsecurity.com/files/152396/WordPress-5.0.0-crop-image-Shell-Upload.html