
PoC for CVE-2025-56399 - Unrestricted File Upload leading to RCE in alexusmai/laravel-file-manager (≤3.3.1). Automates detection, CSRF extraction, and File Upload
CWE-434: Unrestricted Upload of File with Dangerous Type
CVSS Score: 8.5 (High)
This tool provides a Proof of Concept (PoC) for CVE-2025-56399, a critical vulnerability in alexusmai/laravel-file-manager (versions ≤ 3.3.1).
The vulnerability allows an authenticated attacker to achieve Remote Code Execution (RCE) by uploading a crafted file, bypassing client‑side validation, and renaming it to a PHP extension.
This script automates the entire process:
| Attribute | Value |
|---|---|
| Vulnerability Type | Unrestricted File Upload → RCE |
| CWE | CWE-434 |
| CVSS Score | 8.5 (High) |
| Attack Vector | Network |
| Attack Complexity | Low |
| Privileges Required | Low (Authenticated) |
| User Interaction | Active |
/file-manager).png file containing PHP code.phpgit clone https://github.com/Jenderal92/laravel-filemanager-unrestricted-upload.git
cd laravel-filemanager-unrestricted-upload
pip install -r requirements.txt
Requirements
· Python 2.7 · requests · colorama
📖 Usage
python2 lfm.py list.txt
Input Format (list.txt)
https://target1.com
https://target2.com
http://target3.com
Output
· valid.txt – List of validated shell URLs (append ?shinday=1 to access)
Example output:
https://target.com/storage/shxt_123456.php?shinday=1
🧪 How the Exploit Works
📂 Payload Details
The uploaded PHP file is a one‑file web shell that:
· Displays system information (php_uname) · Provides a file upload form (for adding more tools) · Responds to the parameter ?shinday=1 with the full shell interface · Otherwise, outputs a valid GIF89a image to avoid detection
Access the shell via:
https://target.com/path/to/shxt_123456.php?shinday=1
🛡️ Mitigation
To protect against this vulnerability:
Route::group(['middleware' => ['auth', 'admin']], function () {
// File Manager routes
});
composer remove alexusmai/laravel-file-manager
<FilesMatch "\.(php|phtml|php3|php4|php5|phar)$">
Deny from all
</FilesMatch>
📦 Affected Versions
Package Affected Versions alexusmai/laravel-file-manager ≤ 3.3.1
🔗 References
· CVE-2025-56399 - NVD · GitHub Advisory · Snyk Vulnerability Database · VulDB Entry · alexusmai/laravel-file-manager
📜 Disclaimer
WARNING: This tool is for educational and authorized security testing only. By using it, you agree to:
· Only test systems you own or have explicit permission to test · Not use it for malicious purposes · Comply with all applicable laws
The author assumes no liability for any misuse or damage caused.
More Disclaimer You Can see the disclaimer on the cover of Jenderal92. You can check it HERE !!!