Description
WordPress before 5.1.1 does not properly filter comment content, leading to Remote Code Execution by unauthenticated users in a default configuration. This occurs because CSRF protection is mishandled, and because Search Engine Optimization of A elements is performed incorrectly, leading to XSS. The XSS results in administrative access, which allows arbitrary changes to .php files. This is related to wp-admin/includes/ajax-actions.php and wp-includes/comment.php.
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.1.1+dfsg1-1 | — |
| Debian 13 | wordpress | 5.1.1+dfsg1-1 | — |
| Debian 12 | wordpress | 5.1.1+dfsg1-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.
GitHub 6 repositories
-
sijiahi/Wordpress_cve-2019-9787_defense ★ 3 · May 1, 2020
This is a recurrence of cve-2019-9787 on Wordpress and a hash-based defense.
-
rkatogit/cve-2019-9787_csrf_poc ★ 2 · Apr 15, 2019
-
kuangting4231/mitigation-cve-2019-9787 ★ 0 · Apr 30, 2022
-
dexXxed/CVE-2019-9787 ★ 0 · Jun 29, 2021
Overview PoC of CSRF CVE-2019-9787 WordPress Version 5.1.1
-
matinciel/Wordpress_CVE-2019-9787 ★ 0 · May 19, 2020
Try to reproduce this issue with Docker
-
PalmTreeForest/CodePath_Week_7-8 ★ 0 · Aug 18, 2019
CodePath Assignment for Weeks 7 & 8: CVE-2017-14719, CVE-2019-9787 & Unauthenticated Page/Post Content Modification via REST API
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 1
- DLA-1742-1 wordpress - security update Debian Security (DSA / DLA) · Mar 9, 2026
References
- https://blog.ripstech.com/2019/wordpress-csrf-to-rce/
- https://wordpress.org/news/2019/03/wordpress-5-1-1-security-and-maintenance-release/
- https://github.com/WordPress/WordPress/commit/0292de60ec78c5a44956765189403654fe4d080b
- https://wpvulndb.com/vulnerabilities/9230
- 107411 vdb-entry
- https://wordpress.org/support/wordpress-version/version-5-1-1/
- [debian-lts-announce] 20190331 [SECURITY] [DLA 1742-1] wordpress security update mailing-list
- DSA-4677 vendor-advisory