CVE-2017-20251
Deferred Deferred - Pending Action
PHP Code Injection in WordPress Insert PHP Plugin

Publication date: 2026-06-09

Last updated on: 2026-06-09

Assigner: VulnCheck

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.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-06-09
Last Modified
2026-06-09
Generated
2026-06-09
AI Q&A
2026-06-09
EPSS Evaluated
N/A
NVD
EUVD
Affected Vendors & Products
Showing 5 associated CPEs
Vendor Product Version / Range
themeisle insert_php to 3.3.1 (exc)
themeisle woody_code_snippets to 3.3.1 (exc)
wordpress wordpress 4.7.0
wordpress wordpress 4.7.1
wordpress_insert_php plugin to 3.3.1 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-94 The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
Attack-Flow Graph
AI Quick Actions
Instant insights powered by AI
Executive Summary

The vulnerability in the WordPress Insert PHP plugin versions before 3.3.1 is a critical PHP code injection flaw. It allows unauthenticated attackers to execute arbitrary PHP code on the server by injecting malicious shortcodes through the WordPress REST API.

Attackers exploit this by sending crafted POST requests to the wp-json/wp/v2/posts endpoint with content containing insert_php shortcodes that reference remote PHP files. When the WordPress site processes these shortcodes, it executes the injected PHP code, potentially allowing remote code execution.

This vulnerability arises due to improper input validation and control of code generation within the plugin.

Impact Analysis

This vulnerability can have severe impacts because it allows unauthenticated attackers to execute arbitrary PHP code on your WordPress server.

  • Attackers can gain full control over your server by executing malicious code remotely.
  • It can lead to data breaches, website defacement, unauthorized access, and further exploitation of your server.
  • Since no authentication is required, the attack surface is wide and the risk is high.
Compliance Impact

The vulnerability allows unauthenticated attackers to execute arbitrary PHP code on the server, which can lead to unauthorized access, data breaches, and potential compromise of sensitive information.

Such unauthorized access and potential data breaches can negatively impact compliance with common standards and regulations like GDPR and HIPAA, which require protection of personal and sensitive data.

However, the provided resources do not explicitly discuss the direct impact of this vulnerability on compliance with these regulations.

Detection Guidance

This vulnerability can be detected by monitoring for suspicious POST requests to the WordPress REST API endpoint `wp-json/wp/v2/posts` that contain malicious `insert_php` shortcodes.

You can use network monitoring or web server logs to identify such requests. For example, using command-line tools like curl or grep to search for POST requests with payloads containing `[insert_php]` or `[php]` tags can help detect exploitation attempts.

  • Use grep on web server logs to find suspicious POST requests: `grep -i '\[insert_php\]' /var/log/apache2/access.log`
  • Use curl to simulate a test POST request to the REST API endpoint and check response behavior: `curl -X POST -d 'content=[insert_php]phpinfo();[/insert_php]' https://yourwordpresssite.com/wp-json/wp/v2/posts`
  • Monitor network traffic for POST requests to `/wp-json/wp/v2/posts` containing suspicious shortcode patterns.
Mitigation Strategies

The immediate mitigation step is to update the WordPress Insert PHP plugin to version 3.3.1 or later, where this vulnerability is fixed.

If updating is not immediately possible, consider disabling or removing the Insert PHP plugin to prevent exploitation.

Additionally, restrict access to the WordPress REST API endpoints or implement web application firewall (WAF) rules to block POST requests containing `insert_php` shortcodes.

Chat Assistant
Ask questions about this CVE
Hi! I’m here to help you understand CVE-2017-20251. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70
EPSS Chart