
WordPress File Upload RCE Exploit
python3 exploit.py <target>
CVE-2025-3515 is a file upload vulnerability in the "Drag and Drop Multiple File Upload for Contact Form 7" WordPress plugin that allows unauthenticated attackers to upload malicious files and achieve remote code execution.
/inc/dnd-upload-cf7.phpdnd_upload_cf7_upload() (line 856)Missing extensions in blacklist: .phar, .php5,
.inc// Line 107-108 - Potential path traversal
if ( $handle = fopen( $htaccess_file, 'w' ) ) {
fwrite( $handle, "Options -Indexes \n <Files *.php> \n deny from all \n </Files>" );
// Line 523-524 - Unvalidated log writing
$file = fopen( $uploads_dir['upload_dir']."/logs.txt", "a");
fwrite( $file, "\n". ( is_array( $message ) ? print_r( $message, true ) : $message ) );
# Search for suspicious uploads
find /wp-content/uploads/ -name "*.phar" -o -name "*.php5" -o -name "*.inc"
# Check for web shells
grep -r "system\|exec\|shell_exec" /wp-content/uploads/
# Apache/Nginx access logs
grep "admin-ajax.php" /var/log/apache2/access.log | grep "dnd_codedropz_upload"
# WordPress debug logs
grep "dnd_upload_cf7_upload" /wp-content/debug.log