A Leader in the 2026 Gartner® Magic Quadrant™ for Endpoint Protection. Six years running.Six years. Gartner® Magic Quadrant™ Leader.Find Out Why
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2017-20251

CVE-2017-20251: WordPress Insert PHP Plugin RCE Flaw

CVE-2017-20251 is a PHP code injection flaw in WordPress Insert PHP plugin that lets unauthenticated attackers execute arbitrary code via REST API. This article covers technical details, affected versions, and mitigation.

Published: June 11, 2026

CVE-2017-20251 Overview

CVE-2017-20251 is a PHP code injection vulnerability affecting the WordPress Insert PHP plugin in versions prior to 3.3.1. The flaw allows unauthenticated attackers to execute arbitrary PHP code on the underlying server. Attackers exploit the issue by submitting crafted POST requests to the WordPress REST API endpoint wp-json/wp/v2/posts containing malicious insert_php shortcodes. These shortcodes instruct the plugin to include and execute remote PHP files of the attacker's choosing. The weakness is classified as Improper Control of Generation of Code [CWE-94].

Critical Impact

Unauthenticated remote attackers can achieve full remote code execution on WordPress servers running vulnerable versions of the Insert PHP plugin, leading to complete site compromise.

Affected Products

  • WordPress Insert PHP plugin versions prior to 3.3.1
  • WordPress installations exposing the wp-json/wp/v2/posts REST API endpoint with the plugin enabled
  • Sites that allow content submission processed through the vulnerable shortcode parser

Discovery Timeline

  • 2026-06-09 - CVE-2017-20251 published to NVD
  • 2026-06-09 - Last updated in NVD database

Technical Details for CVE-2017-20251

Vulnerability Analysis

The Insert PHP plugin registers an insert_php shortcode that evaluates the PHP code contained within its body. The plugin processes this shortcode whenever WordPress renders post content, including content submitted through the REST API. Because the REST API endpoint wp-json/wp/v2/posts accepts unauthenticated submissions in certain configurations, attackers can store PHP payloads that the server then executes. The vulnerability is a textbook Code Injection flaw [CWE-94], where untrusted input is treated as executable code without validation or sandboxing.

Root Cause

The plugin's shortcode handler passes user-controlled content directly to a PHP execution context. There is no allowlist of permitted functions, no input sanitization, and no authentication requirement enforced before shortcode evaluation. When combined with WordPress's permissive REST API behavior, the result is unauthenticated remote code execution.

Attack Vector

An attacker sends a POST request to /wp-json/wp/v2/posts containing post content with an insert_php shortcode. The shortcode body references a remote PHP file via an include directive. When WordPress processes the post for rendering, the plugin evaluates the shortcode and includes the attacker-hosted PHP file. The remote file executes in the context of the web server user, granting the attacker control over the WordPress installation. Public proof-of-concept material is referenced in Exploit-DB #41308 and the VulnCheck Advisory on WordPress Plugin.

Detection Methods for CVE-2017-20251

Indicators of Compromise

  • POST requests to /wp-json/wp/v2/posts containing the string insert_php or [insert_php] in the request body.
  • Outbound HTTP or HTTPS requests from the web server to unknown hosts immediately after a REST API write event, indicating remote file inclusion.
  • New or modified PHP files in the WordPress uploads or plugin directories with recent timestamps.
  • Web shells or backdoors written under wp-content/uploads/ following suspicious POST activity.

Detection Strategies

  • Inspect web server access logs for unauthenticated POST requests to wp-json/wp/v2/posts followed by GET requests retrieving the created post.
  • Hunt across stored post content for the insert_php shortcode in the wp_posts table.
  • Alert on PHP processes spawning shell utilities such as sh, bash, curl, or wget from the web server context.

Monitoring Recommendations

  • Forward WordPress and web server logs to a centralized analytics platform for correlation of REST API writes with shortcode payloads.
  • Monitor file integrity across the wp-content/plugins/ and wp-content/uploads/ directories.
  • Track egress connections from PHP-FPM or Apache worker processes to identify remote file inclusion attempts.

How to Mitigate CVE-2017-20251

Immediate Actions Required

  • Upgrade the Insert PHP plugin to version 3.3.1 or later, or remove the plugin if it is not required.
  • Audit the wp_posts table for stored insert_php shortcodes and remove any malicious entries.
  • Review the WordPress installation for unauthorized administrator accounts, modified PHP files, and unknown scheduled tasks.
  • Rotate WordPress credentials, secret keys in wp-config.php, and any API tokens that may have been exposed.

Patch Information

The vendor addressed the issue in Insert PHP version 3.3.1. Plugin details are available at the WordPress Plugin Overview. Administrators should apply the update through the WordPress plugin manager or replace the plugin files manually.

Workarounds

  • Disable the Insert PHP plugin until patching is complete.
  • Restrict access to the /wp-json/wp/v2/posts endpoint using a web application firewall rule that blocks unauthenticated POST requests.
  • Filter inbound request bodies for the insert_php shortcode and reject matching requests at the perimeter.
  • Enforce disable_functions in php.ini to limit dangerous PHP functions such as exec, system, and passthru.
bash
# Configuration example: block insert_php shortcode submissions via nginx
location ~ ^/wp-json/wp/v2/posts {
    if ($request_method = POST) {
        if ($request_body ~* "insert_php") {
            return 403;
        }
    }
}

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechWordpress

  • SeverityCRITICAL

  • CVSS Score9.3

  • EPSS Probability0.07%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-94
  • Technical References
  • WordPress Plugin Overview

  • Exploit-DB #41308

  • VulnCheck Advisory on WordPress Plugin
  • Related CVEs
  • CVE-2023-54352: WordPress Seotheme RCE Vulnerability

  • CVE-2023-54350: WordPress Augmented-Reality RCE Flaw

  • CVE-2024-58349: WordPress Travelscape Theme RCE Flaw

  • CVE-2024-58348: WordPress Background Image Cropper RCE
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English