Description
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.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | wordpress | 5.0.1+dfsg1-1 | — |
| Debian 13 | wordpress | 5.0.1+dfsg1-1 | — |
| Debian 12 | wordpress | 5.0.1+dfsg1-1 | — |
| Debian 9 | wordpress | 4.7.5+dfsg-2+deb9u5 | DSA-4401-1 |
| Debian 8 | wordpress | 4.1.26+dfsg-1+deb8u1 | DLA-1742-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 18.04 LTS | wordpress | No fix yet | — |
| Ubuntu 16.04 LTS | wordpress | No fix yet | — |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Metasploit 1 module
-
WordPress Crop-image Shell Upload
exploit/multi/http/wp_crop_rce
Exploit-DB 2
- WordPress Core 5.0.0 - Crop-image Shell Upload (Metasploit) EDB-46662 · remote · Apr 5, 2019 · verified
- WordPress Core 5.0 - Remote Code Execution EDB-46511 · webapps · Mar 1, 2019
GitHub 5 repositories
-
brianwrf/WordPress_4.9.8_RCE_POC ★ 74 · Feb 25, 2019
A simple PoC for WordPress RCE (author priviledge), refer to CVE-2019-8942 and CVE-2019-8943.
-
synacktiv/CVE-2019-8942 ★ 4 · May 2, 2019
WordPress crop-image exploitation
-
SpeatX/WordPress-RCE-CVE-2019-8942 ★ 1 · May 22, 2026
Python exploit toolkit for WordPress Crop Image RCE — CVE-2019-8942 & CVE-2019-8943
-
tuannq2299/CVE-2019-8942 ★ 1 · May 31, 2022
-
synod2/WP_CROP_RCE ★ 0 · May 5, 2021
cve-2019-8942, cve-2019-8943
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 2
- DSA-4401-1 wordpress - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DLA-1742-1 wordpress - security update Debian Security (DSA / DLA) · Mar 9, 2026
References
- https://wpvulndb.com/vulnerabilities/9222
- 46511 exploit
- 107088 vdb-entry
- https://blog.ripstech.com/2019/wordpress-image-remote-code-execution/
- DSA-4401 vendor-advisory
- [debian-lts-announce] 20190331 [SECURITY] [DLA 1742-1] wordpress security update mailing-list
- http://packetstormsecurity.com/files/152396/WordPress-5.0.0-crop-image-Shell-Upload.html
- http://www.rapid7.com/db/modules/exploit/multi/http/wp_crop_rce
- 46662 exploit