## https://sploitus.com/exploit?id=B3AEECD4-47B3-5686-8FDB-09F4C81043C2
# π¨ CVE-2024-50492 - ScottCart π₯ Exploit Script for ScottCart π§βπ» By Nxploit β *Khaled Alenazi*
---
## π Description
The **ScottCart** plugin for WordPress (versions β€ 1.1) is vulnerable to **Remote Code Execution (RCE)**.
This allows **unauthenticated attackers** to execute arbitrary PHP functions on the server through a vulnerable AJAX endpoint.
- **Plugin**: ScottCart β€ 1.1
- **Vulnerability**: Unauthenticated Function Injection β RCE
- **CVE**: CVE-2024-50492
- **CVSS Score**: **9.8 - Critical**
---
## π§ How it works
The plugin registers an unprotected AJAX action:
```php
add_action('wp_ajax_nopriv_scottcart_load_function', 'scottcart_load_function_callback');
```
Which executes:
```php
call_user_func($_POST['function']);
```
Allowing attackers to call **any existing PHP function**, like:
- `phpinfo()`
- `scottcart_get_the_user_ip()`
- `system()` β if extended in modified environments
---
## π Exploit Features
- β
Automatically sends crafted payload to trigger the vulnerable endpoint
- β
Allows function override via argument
- β
Default payload: `phpinfo()` for PoC
- β
Saves output to timestamped file (e.g., `results_2025-03-26_14-33-01.txt`)
- β
Custom `User-Agent`, error handling, and SSL ignore for stealth
---
## π₯οΈ Usage
```bash
usage: CVE-2024-50492.py [-h] -u URL [-p PAYLOAD]
ScottCart 8.1.12
...
```
π And saved in: `results_2025-03-26_14-33-01.txt`
---
## π‘οΈ Disclaimer
This tool is for **educational and authorized testing** purposes only.
Do **not** use against systems you do not own or have explicit permission to test.
---
## π¬ Credits
- π» Exploit by: [Nxploit β Khaled Alenazi](https://github.com/Nxploited)
- π‘οΈ CVE ID: CVE-2024-50492