CVE-2021-23814
JSON

6.7medium

Unrestricted Upload of File with Dangerous Type in unisharp/laravel-filemanager

Severity
6.7medium CVSS:3.1 by snyk
Exploit likelihood
1.83% (higher than 79% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
snyk
Also known as
GHSA-f8x6-m9f5-ffp8SNYK-PHP-UNISHARPLARAVELFILEMANAGER-1567199

Description

This affects versions of the package unisharp/laravel-filemanager before 2.6.2. The upload() function does not sufficiently validate the file type when uploading. An attacker may be able to reproduce the following steps: 1. Install a package with a web Laravel application. 2. Navigate to the Upload window 3. Upload an image file, then capture the request 4. Edit the request contents with a malicious file (webshell) 5. Enter the path of file uploaded on URL - Remote Code Execution **Note:** Prevention for bad extensions can be done by using a whitelist in the config file(lfm.php). Corresponding document can be found in [here](https://unisharp.github.io/laravel-filemanager/configfolder-categories).

Affected

Product or packageVersionsReported by
unisharp/laravel-filemanagerbefore 2.6.2CVE List
unisharp/laravel-filemanager (Packagist)before 2.6.2GitHub Advisory Database
unisharp laravel-filemanagerfrom 0.0.0NVD

All scores

snyk6.7medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:L/E:P
GitHub6.7medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:L
NVD8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD6.5medium CVSS:2.0AV:N/AC:L/Au:S/C:P/I:P/A:P

Classification

What each source says

CVE List

This affects versions of the package unisharp/laravel-filemanager before 2.6.2. The upload() function does not sufficiently validate the file type when uploading. An attacker may be able to reproduce the following steps: 1. Install a package with a web Laravel application. 2. Navigate to the Upload window 3. Upload an image file, then capture the request 4. Edit the request contents with a malicious file (webshell) 5. Enter the path of file uploaded on URL - Remote Code Execution **Note:** Prevention for bad extensions can be done by using a whitelist in the config file(lfm.php). Corresponding document can be found in [here](https://unisharp.github.io/laravel-filemanager/configfolder-categories).

GitHub Advisory Database

This affects the package unisharp/laravel-filemanager prior to version 2.6.2. The upload() function does not sufficiently validate the file type when uploading.

An attacker may be able to reproduce the following steps:

  • Install a package with a web Laravel application.
  • Navigate to the Upload window
  • Upload an image file, then capture the request
  • Edit the request contents with a malicious file (webshell)
  • Enter the path of file uploaded on URL
  • Remote Code Execution

**Note: Prevention for bad extensions can be done by using a whitelist in the config file(lfm.php). Corresponding document can be found in the here.

NVD (es)

Esto afecta al paquete unisharp/laravel-filemanager desde la versión 0.0.0. La función upload() no comprueba suficientemente el tipo de archivo cuando es cargado. Un atacante puede ser capaz de reproducir los siguientes pasos: - Instalar un paquete con una aplicación web Laravel. - Navegar a la ventana de subida - Subir un archivo de imagen, luego capturar la petición - Editar el contenido de la petición con un archivo malicioso (webshell) - Introducir la ruta del archivo subido en la URL - Ejecución de Código Remota. **Nota: La prevención para extensiones malas puede hacerse usando una lista blanca en el archivo de configuración (lfm.php). El documento correspondiente puede encontrarse en [aquí](https://unisharp.github.io/laravel-filemanager/configfolder-categories)

References

https://security.snyk.io/vuln/SNYK-PHP-UNISHARPLARAVELFILEMANAGER-1567199
https://github.com/UniSharp/laravel-filemanager/blob/master/src/Controllers/UploadController.php%23L26broken-link, third-party-advisory, web
https://github.com/UniSharp/laravel-filemanager/releases/tag/v2.5.1
https://github.com/UniSharp/laravel-filemanager/issues/1113
https://github.com/UniSharp/laravel-filemanager/releases/tag/v2.6.2
https://snyk.io/vuln/SNYK-PHP-UNISHARPLARAVELFILEMANAGER-1567199third-party-advisory, web
https://github.com/UniSharp/laravel-filemanager/issues/1113#issuecomment-1812092975web
https://nvd.nist.gov/vuln/detail/CVE-2021-23814advisory
https://github.com/UniSharp/laravel-filemanager/commit/bd84899ce65a7f193e676dd8444e424fa50f64faweb
https://github.com/UniSharp/laravel-filemanagerpackage
https://github.com/UniSharp/laravel-filemanager/blob/master/src/Controllers/UploadController.php#L26web

Sources

SourceRecordLicence
CVE ListCVE-2021-23814 changed 2025-06-17CVE Terms of Use
GitHub Advisory DatabaseGHSA-f8x6-m9f5-ffp8 changed 2025-06-18CC-BY-4.0
NVDCVE-2021-23814 changed 2026-06-17Public domain