Threat Overview
A high-severity path traversal and arbitrary file deletion vulnerability in Drag and Drop File Upload for Elementor Forms (drag-and-drop-file-upload-for-elementor-forms) allows unauthenticated attackers to delete critical files across the server filesystem.
Tracked under CVE-2026-124218 (CVSS 8.6), versions up to and including 1.6.2 fail to sanitize file path inputs in the upload cleanup routine. By traversing out of the uploads folder and deleting wp-config.php, an attacker forces WordPress into its initial setup screen to claim full administrative code execution.
| Threat Metric | Technical Details |
|---|---|
| Severity Rating | HIGH (CVSS 8.6 / 10.0) |
| Vulnerability Class | Improper Limitation of a Pathname to a Restricted Directory (CWE-22) |
| Vulnerable Components | Drag and Drop File Upload for Elementor Forms (Versions up to and including 1.6.2) |
| Attack Vector | Unauthenticated HTTP request to upload cleanup handler with ../ traversal |
| Exploit Precondition | Active Drag and Drop File Upload for Elementor Forms plugin up to 1.6.2 |
| Fixed Versions | Patched in version 1.6.3 |
Our Take in Plain English
“Most business owners assume deleting a file is at worst a nuisance that breaks an image. In WordPress, however, deleting a single file—
wp-config.php—causes the entire platform to forget it was ever installed and present the fresh setup screen to the very next visitor. When an attacker triggers that reset, they connect their own database and own the server. Pre-rendered static edge sites have nowp-config.phpand no live installer to hijack.”
The Breakdown: How the Exploit Works
When a visitor removes a staged attachment from an Elementor form before submitting, the plugin invokes an unauthenticated AJAX cleanup handler to delete the temporary file from disk.
In versions up to and including 1.6.2, the cleanup routine accepts a client-supplied filename parameter and passes it to PHP’s file deletion function without stripping directory traversal sequences (../) or verifying confinement within the temporary upload folder.
An unauthenticated remote attacker supplies a relative path pointing to ../wp-config.php. Once wp-config.php is unlinked, the next HTTP request to the site triggers /wp-admin/setup-config.php, allowing the attacker to bind a remote MySQL server under their control and execute arbitrary PHP code.
The Operational Risk: What an Attacker Gains
- Configuration Wipe & Installer Hijack: Deleting
wp-config.phpexposes the interactive WordPress installer to immediate takeover. - Remote Code Execution via Rogue Database: Binding an attacker-controlled database allows immediate admin login and malicious plugin installation.
- Denial of Service: Deleting core application or theme files immediately crashes the public website.
- Security Control Removal: Attackers can delete
.htaccessor web-application firewall configuration files guarding restricted directories.
The Modern Architectural Remedy
- Legacy Dynamic WordPress: Executes third-party plugin endpoints, database queries, and session handlers inside a single shared PHP runtime on the public origin server.
- Modern Pre-Rendered Edge Architecture: Compiles public pages into read-only static HTML at the global edge, eliminating exposed PHP endpoints and database attack surfaces.
Immediate Action Items for WordPress Operators
- Upgrade to Version 1.6.3+: Update
drag-and-drop-file-upload-for-elementor-formsto version1.6.3or later immediately. - Harden wp-config.php Permissions: Restrict filesystem permissions on
wp-config.php(0400or0440) so the web-server worker cannot unlink it. - Block Public Installer Scripts: Configure web server rules to block public access to
/wp-admin/setup-config.phpand/wp-admin/install.php. - Verify Backup Integrity: Ensure off-server backups of
wp-config.phpand the database are current.
