The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
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-2026-7252

CVE-2026-7252: WP-Optimize Path Traversal Vulnerability

CVE-2026-7252 is a path traversal flaw in WP-Optimize plugin for WordPress that allows authenticated attackers to delete arbitrary files, potentially leading to remote code execution. This article covers technical details, affected versions, impact, and mitigation steps.

Published: May 7, 2026

CVE-2026-7252 Overview

CVE-2026-7252 is an arbitrary file deletion vulnerability in the WP-Optimize WordPress plugin. The flaw resides in the unscheduled_original_file_deletion function and affects all versions up to and including 4.5.2. Authenticated attackers with author-level access or higher can delete arbitrary files on the server. Deleting critical files such as wp-config.php can trigger WordPress reinstallation flows and lead to remote code execution. The root issue is that original-file is a public meta key, which allows authors to create or modify it on their own attachment posts through the standard Edit Media form or the REST API.

Critical Impact

Authenticated authors can delete wp-config.php and other critical files, enabling site takeover and remote code execution.

Affected Products

  • WP-Optimize – Cache, Compress images, Minify & Clean database plugin for WordPress
  • All versions up to and including 4.5.2
  • Fixed in version 4.5.3

Discovery Timeline

  • 2026-05-07 - CVE-2026-7252 published to NVD
  • 2026-05-07 - Last updated in NVD database

Technical Details for CVE-2026-7252

Vulnerability Analysis

The WP-Optimize plugin includes an image optimization feature (Smush) that retains a backup of the original image after compression. When the user disables retention, the plugin invokes unscheduled_original_file_deletion to remove the backup file. The function reads the file path from the original-file post meta on an attachment and passes it to a delete operation without enforcing that the path resides within the WordPress uploads directory.

The vulnerability is classified as a Path Traversal weakness under CWE-22. Because authors can manage their own attachment posts, an attacker can upload an image, set the original-file meta to an arbitrary absolute path, and trigger the deletion routine. Removing wp-config.php causes WordPress to enter the install state, allowing an attacker to point the site at an attacker-controlled database and achieve code execution.

Root Cause

The root cause is dual: insufficient file path validation in unscheduled_original_file_deletion combined with the use of a non-protected meta key. WordPress treats meta keys that begin with an underscore as protected, blocking direct edits through the Edit Media form and REST API. The original-file key has no underscore prefix, so authors can write arbitrary string values to it on attachments they own. See the affected source at class-updraft-smush-manager.php L1645.

Attack Vector

Exploitation requires an authenticated session with author-level capabilities or higher. The attacker uploads or selects an attachment, sets the original-file meta value to a path such as the absolute location of wp-config.php, and invokes the plugin action that calls unscheduled_original_file_deletion. The PHP process executes the unlink against the attacker-supplied path with the privileges of the web server. No user interaction is required from administrators.

No verified proof-of-concept code is published. Refer to the
Wordfence advisory and the WordPress.org changeset for technical details:
https://www.wordfence.com/threat-intel/vulnerabilities/id/cc815ef2-dd02-4faa-b202-dd1552f889db

Detection Methods for CVE-2026-7252

Indicators of Compromise

  • Attachment posts owned by author-level accounts containing an original-file postmeta value with absolute paths or directory traversal sequences such as ../.
  • Unexpected absence of wp-config.php or sudden appearance of the WordPress installation screen at the site root.
  • New administrator accounts created shortly after WordPress reinstallation flows are triggered.
  • File deletion entries in PHP error logs referencing class-updraft-smush-manager.php.

Detection Strategies

  • Audit the wp_postmeta table for rows with meta_key = 'original-file' and inspect values for paths outside the uploads directory.
  • Monitor WordPress REST API calls to /wp/v2/media/{id}/meta and Edit Media form submissions that set original-file.
  • Review filesystem audit logs for unlink operations executed by the PHP-FPM or web server user against paths outside wp-content/uploads/.

Monitoring Recommendations

  • Enable WordPress activity logging for attachment metadata changes by non-administrator accounts.
  • Alert on integrity changes to wp-config.php, .htaccess, and core PHP files via file integrity monitoring.
  • Track plugin version inventory and flag WordPress sites running WP-Optimize 4.5.2 or earlier.

How to Mitigate CVE-2026-7252

Immediate Actions Required

  • Update the WP-Optimize plugin to version 4.5.3 or later on every WordPress instance.
  • Audit all author, editor, and contributor accounts and disable any that are unused or unrecognized.
  • Verify integrity of wp-config.php and core WordPress files; restore from a known-good backup if tampered.
  • Rotate database credentials and WordPress secret keys if compromise is suspected.

Patch Information

The vendor addressed CVE-2026-7252 in WP-Optimize version 4.5.3. The fix is documented in WordPress Changeset #3518513 and the 4.5.2 to 4.5.3 diff. Additional details are available in the Wordfence Vulnerability Report.

Workarounds

  • Deactivate the WP-Optimize plugin until the update to 4.5.3 can be applied.
  • Restrict the author role using a capability manager so only trusted users can upload media or edit attachments.
  • Enforce least privilege on the web server user so PHP cannot delete files outside wp-content/.
bash
# Restrict filesystem permissions so PHP cannot remove wp-config.php
chown root:www-data /var/www/html/wp-config.php
chmod 640 /var/www/html/wp-config.php

# Quickly identify vulnerable WP-Optimize installs
grep -R "Version: 4.5." /var/www/*/wp-content/plugins/wp-optimize/wp-optimize.php

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

  • Vulnerability Details
  • TypePath Traversal

  • Vendor/TechWp Optimize

  • SeverityHIGH

  • CVSS Score8.1

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-22
  • Technical References
  • WordPress File Reference: L1645

  • WordPress File Reference: L1649

  • WordPress File Reference: L81

  • WordPress File Reference: L1645

  • WordPress File Reference: L1649

  • WordPress File Reference: L81

  • WordPress Changeset #3518513

  • WordPress Version Update: 4.5.2 to 4.5.3

  • Wordfence Vulnerability Report
  • Related CVEs
  • CVE-2025-28970: WP Optimize By xTraffic Object Injection
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now 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