CVE-2017-20251 WordPress Insert PHP Plugin < 3.3.1 PHP Code Injection via REST API

Critical 9.3 Published Updated

Unauthenticated attackers can execute arbitrary PHP code via the REST API in the Insert PHP plugin, requiring an upgrade to mitigate.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2017-20251?

CVE-2017-20251 is a critical code injection vulnerability in Themeisle Woody Code Snippets, published on 9 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

WordPress Insert PHP plugin versions before 3.3.1 contain a PHP code injection vulnerability that allows unauthenticated attackers to execute arbitrary PHP code by injecting malicious shortcodes through the WordPress REST API. Attackers can send POST requests to the wp-json/wp/v2/posts endpoint with crafted content containing insert_php shortcodes to include and execute remote PHP files on the server.

Weakness: CWE-94

Which versions are affected by CVE-2017-20251?

How do I fix CVE-2017-20251?

No fix has been published for CVE-2017-20251 yet. Limit exposure of the affected software until one is available.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2017-20251 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2017-20251 exists.

Public exploit code: 1 proofs of concept on GitHub.

Sources

Also known as GHSA-mxq7-4xcj-jccm.

Is CVE-2017-20251 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free