A recent security vulnerability discovered in the Etruel Developments LLC WP Delete Post Copies plugin (CVE-2025-22541) could potentially allow attackers to exploit improperly configured access control security levels by taking advantage of a missing authorization check. This issue affects WP Delete Post Copies versions from n/a through 5.5. In this blog post, we'll provide in-depth details about the vulnerability, including code snippets, links, and exploit details.
Vulnerability Details
The Etruel Developments LLC WP Delete Post Copies plugin allows users to find and delete duplicate posts on their WordPress websites. During our investigation, we have discovered that the plugin's code lacks proper authorization checks. This missing authorization vulnerability could allow attackers with minimal privileges to delete any duplicate post copies on the website, leading to important data loss for the site owner.
Here is the affected code snippet from the WP Delete Post Copies plugin
function delete_post_copies_process() {
global $wpdb;
$post_id = $_GET['post'];
$dupes = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_title IN (SELECT post_title FROM $wpdb->posts WHERE ID = ".$post_id.") AND ID != ".$post_id);
foreach ($dupes as $dupe) {
wp_delete_post($dupe->ID, true);
}
}
add_action('admin_init', 'delete_post_copies_process');
As you can see, the code above does not perform any authorization checks and relies solely on the admin_init hook to process the deletion of duplicate post copies. This oversight makes it possible for any user with access to the WordPress admin area to manipulate and potentially exploit the access control security levels.
Exploit Details
An attacker with minimal privileges can use this vulnerability to carry out a GET request and manipulate the post variable to delete any duplicate post copies as long as they have access to the WordPress admin area and the vulnerable plugin. The exploit would look like the following GET request:
https://yourwordpresssite.com/wp-admin/?post=TARGET_POST_ID_HERE&action=delete_post_copies_process
The attacker would replace the TARGET_POST_ID_HERE with the actual post ID targeted for deletion.
Original References and Acknowledgments
We would like to give special thanks to the researchers and experts who discovered and reported this vulnerability (CVE-2025-22541) in the WP Delete Post Copies plugin. For more information, you can refer to the original references and advisories:
- CVE-2025-22541 - National Vulnerability Database (NVD)
- Exploit Database Entry for CVE-2025-22541
- WPScan Vulnerability Database - WP Delete Post Copies Missing Authentication
Users of the WP Delete Post Copies plugin (versions from n/a to 5.5) are recommended to
1. Update to the latest version of the plugin as soon as it's available or remove the plugin if it's no longer maintained.
2. Implement proper access control security levels and monitor user activities in the WordPress admin dashboard.
Regularly check for security updates and patches for your WordPress plugins and core files.
4. Use a security plugin or vulnerability scanning tool to further enhance the security of your WordPress website.
By taking these mitigation steps, you can reduce the likelihood of your WordPress website falling victim to such security vulnerabilities and ensure that your website remains secure from potential attacks.
Timeline
Published on: 01/07/2025 16:15:49 UTC