CVE-2026-7311: TinyPNG WordPress Plugin Arbitrary File Deletion Vulnerability (CVSS 8.1)
The TinyPNG compression plugin for WordPress contains a dangerous flaw that lets authenticated users with author-level permissions delete any file on the web server. An attacker exploits this by manipulating image metadata during the attachment deletion process, allowing them to target critical files like wp-config.php. Deleting the right file can give the attacker full control of the WordPress installation. The vulnerability affects all versions up to and including 3.6.13.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 8.1 HIGH · CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H
- Weaknesses (CWE)
- CWE-22
- Affected products
- 0 configuration(s)
- Published / Modified
- 2026-07-02 / 2026-07-06
NVD description (verbatim)
The TinyPNG – JPEG, PNG & WebP image compression plugin for WordPress is vulnerable to arbitrary file deletion due to insufficient file path validation in the delete_converted_image_size function in all versions up to, and including, 3.6.13. This makes it possible for authenticated attackers, with author-level access and above, to delete arbitrary files on the server, which can easily lead to remote code execution when the right file is deleted (such as wp-config.php). An attacker can exploit this by injecting an arbitrary server file path into the 'convert.path' field of the 'tiny_compress_images' post meta on an attachment they own, then triggering attachment deletion to invoke the vulnerable code path.
6 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-7311 is a path traversal vulnerability (CWE-22) in the TinyPNG WordPress plugin's delete_converted_image_size function. The flaw stems from insufficient validation of the 'convert.path' field stored in post meta for attachments. When an attachment is deleted, the vulnerable function processes this path without proper sanitization, enabling an authenticated attacker to inject arbitrary file paths. By crafting a malicious path in the 'tiny_compress_images' post meta on an attachment they own, an attacker can trigger deletion of arbitrary files on the server. The CVSS v3.1 score of 8.1 (HIGH) reflects the high integrity and availability impact, requiring only low attack complexity and low privileges to exploit.
Business impact
Compromise of WordPress installations running the TinyPNG plugin exposes organizations to critical operational and security risks. An attacker with author-level access can delete essential configuration or core files, causing immediate service disruption or enabling remote code execution. Deletion of wp-config.php or similar files can render the site inoperable while simultaneously allowing the attacker to upload malicious code or establish persistent backdoors. For organizations relying on WordPress for customer-facing services, content delivery, or business logic, this can result in downtime, data loss, and reputational damage. Compromise can cascade to underlying infrastructure if the WordPress environment has elevated privileges.
Affected systems
The TinyPNG – JPEG, PNG & WebP image compression plugin for WordPress is affected in all versions up to and including 3.6.13. Any WordPress installation running this plugin with users holding author-level permissions or higher is at risk. This includes sites where content creators, contributors with elevated roles, or administrators have access. The plugin's ubiquity in WordPress environments—particularly on media-heavy sites—suggests broad exposure across diverse organizations and use cases.
Exploitability
Exploitation requires authentication and author-level or higher privileges, which moderately raises the barrier compared to unauthenticated attacks. However, many WordPress sites grant author-level access to multiple users (content creators, editors, external contributors), reducing the practical difficulty. The attack requires no user interaction, no special network conditions, and the vulnerable code path is trivial to trigger by simply deleting an attachment. The attacker need only craft a single malicious post meta entry on an attachment they control. This combination makes the vulnerability highly exploitable within the context of a compromised or malicious authenticated user.
Remediation
Organizations must immediately update the TinyPNG plugin to a patched version addressing this vulnerability. Verify the specific version number in the vendor advisory before deploying. Until patched, restrict author-level and above permissions to trusted users only, audit existing user roles, and consider disabling the plugin if it is not actively required. Monitor file deletion logs and unexpected changes to wp-config.php and other critical files. Implement file integrity monitoring to detect unauthorized modifications or deletions.
Patch guidance
Apply the latest security update from the TinyPNG plugin developers as soon as it becomes available. Verify the patch version against the official WordPress plugin repository or vendor security advisory. Test the update in a staging environment before rolling out to production to ensure compatibility with your WordPress configuration and any dependent functionality. Review the changelog to confirm the path validation vulnerability has been addressed. After patching, audit any attachments that may have been modified by untrusted users to ensure no backdoors or configurations remain.
Detection guidance
Monitor for suspicious file deletion events, particularly of critical WordPress files such as wp-config.php, .htaccess, or plugin files. Log attachment deletion activities and correlate them with post meta modifications to the 'tiny_compress_images' field containing file paths outside the expected wp-content/uploads directory. Implement file integrity monitoring on wp-config.php and other sensitive configuration files. Review access logs for author-level users performing attachment operations followed by file system anomalies. Web application firewalls can be configured to flag attachment deletion requests that include suspicious path traversal patterns in post meta fields.
Why prioritize this
This vulnerability merits immediate remediation priority due to its HIGH severity rating, the ease of exploitation by authenticated users, and the potential for rapid escalation to remote code execution. The combination of path traversal, arbitrary file deletion, and the prevalence of the plugin across WordPress deployments creates significant organizational risk. Unlike many WordPress vulnerabilities requiring multiple attack steps, this flaw provides a direct path to critical impact with minimal prerequisites. Any organization running this plugin should treat patching as urgent.
Risk score, explained
The CVSS v3.1 score of 8.1 reflects a HIGH-severity vulnerability with network-accessible attack vector, low attack complexity, low privilege requirements, and no user interaction needed. The primary driver is the high impact to integrity (file deletion) and availability (service disruption or system compromise). Although confidentiality impact is not directly affected, the ability to delete wp-config.php enables rapid escalation to remote code execution, which would compromise confidentiality as well. The 'no user interaction' requirement emphasizes the automated nature of the attack once a malicious attachment is staged.
Frequently asked questions
Do I need author-level access to exploit this vulnerability?
Yes. The vulnerability requires authentication and at least author-level permissions on the WordPress site. This means you must either be a legitimate author, editor, or administrator, or an attacker must have compromised a user account with those privileges. However, many WordPress sites grant author access to multiple users (content creators, freelancers, external contributors), which broadens the pool of potential attackers within a single organization.
What files can an attacker delete?
An attacker can delete any file on the server that the WordPress application has file system permissions to access, typically within the web root and associated directories. High-impact targets include wp-config.php (kills the site and allows backdoor installation), .htaccess (disables security rules), active theme files, and plugin files. Deleting critical OS files or application dependencies outside the WordPress directory may be constrained by file permissions, but wp-config.php is almost always within reach.
Is there a temporary mitigation if I cannot patch immediately?
Mitigation options include restricting author-level and above permissions to a minimal set of highly trusted users, disabling the TinyPNG plugin if it is not essential to your workflow, and implementing strict file permission controls to limit the application's write and delete capabilities. File integrity monitoring and access logging can alert you to suspicious deletion attempts. However, these are not substitutes for patching; apply the security update as soon as practical.
How does deleting wp-config.php lead to remote code execution?
wp-config.php contains database credentials and security keys. Once deleted, the WordPress site becomes inoperable. However, an attacker can often re-upload or create a malicious wp-config.php with their own backdoor code, database connections to attacker-controlled servers, or hooks that execute arbitrary PHP. Alternatively, the site failure creates an opportunity for the attacker to inject malicious content or establish a reverse shell during the recovery window when administrators are responding to the outage.
This analysis is provided for informational purposes and reflects the vulnerability as described in the CVE record and publicly available sources as of the publication date. Security teams should verify all patch version numbers and remediation steps against official vendor advisories and release notes before deploying updates. Exploitation requires authentication and author-level access; however, the practical risk depends on your organization's user access policies and the trustworthiness of users granted these permissions. No exploit code or weaponized proof-of-concept is provided. Organizations should conduct their own risk assessment based on their specific WordPress configuration, plugin usage, and user access model. Source: NVD (public-domain), retrieved 2026-08-11. Analysis generated by SEC.co (claude-haiku-4-5).
Weaknesses (CWE)
Related vulnerabilities
- CVE-2016-20076HIGHWordPress Simple-Backup 2.7.11 Unauthenticated File Access & Deletion Vulnerability
- CVE-2016-20081HIGHHB Audio Gallery Lite Path Traversal Vulnerability – Unauthenticated File Download
- CVE-2017-20248HIGHApptha Slider Gallery Path Traversal Vulnerability
- CVE-2017-20250HIGHMac Photo Gallery 3.0 Path Traversal File Download Vulnerability
- CVE-2018-25408HIGHOpen ISES Project Path Traversal Vulnerability (High Severity)
- CVE-2024-32729HIGHPath Traversal in QuantumCloud Conversational Forms for ChatBot (CVSS 7.5)
- CVE-2024-40646HIGHVertex Path Traversal Vulnerability – Remote File Access Risk
- CVE-2025-60223HIGHWPBot Pro Arbitrary File Deletion Vulnerability – HIGH Risk Exploit