{"id":"CVE-2021-23814","aliases":["CVE-2021-23814","GHSA-f8x6-m9f5-ffp8","SNYK-PHP-UNISHARPLARAVELFILEMANAGER-1567199"],"related":[],"kind":"vulnerability","state":"published","title":"Unrestricted Upload of File with Dangerous Type in unisharp/laravel-filemanager","summary":"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.\n\nAn attacker may be able to reproduce the following steps:\n\n1. Install a package with a web Laravel application.\n2. Navigate to the Upload window\n3. Upload an image file, then capture the request\n4. Edit the request contents with a malicious file (webshell)\n5. Enter the path of file uploaded on URL - Remote Code Execution\n\n\n**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).","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.\n\nAn attacker may be able to reproduce the following steps:\n\n1. Install a package with a web Laravel application.\n2. Navigate to the Upload window\n3. Upload an image file, then capture the request\n4. Edit the request contents with a malicious file (webshell)\n5. Enter the path of file uploaded on URL - Remote Code Execution\n\n\n**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).","source":"cvelist"},{"lang":"en","text":"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.\n\nAn attacker may be able to reproduce the following steps:\n- Install a package with a web Laravel application.\n- Navigate to the Upload window\n- Upload an image file, then capture the request\n- Edit the request contents with a malicious file (webshell)\n- Enter the path of file uploaded on URL\n- Remote Code Execution\n\n**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](https://unisharp.github.io/laravel-filemanager/configfolder-categories).","format":"markdown","source":"ghsa"},{"lang":"es","text":"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)","source":"nvd"}],"published":"2021-12-17T20:00:14.149Z","modified":"2026-06-17T03:38:53.513Z","severity":{"scorer":"snyk","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:L/E:P","score":6.7,"rating":"MEDIUM"},"severities":[{"scorer":"snyk","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:L/E:P","score":6.7,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:L","score":6.7,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:S/C:P/I:P/A:P","score":6.5,"rating":"MEDIUM"}],"cwes":["CWE-94","CWE-434"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"2.6.2","status":"affected"}],"product":"unisharp/laravel-filemanager","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.6.2"}],"ecosystem":"Packagist","package":"unisharp/laravel-filemanager","purl":"pkg:composer/unisharp/laravel-filemanager","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"0.0.0"}],"vendor":"unisharp","product":"laravel-filemanager","cpe":"cpe:2.3:a:unisharp:laravel-filemanager:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://security.snyk.io/vuln/SNYK-PHP-UNISHARPLARAVELFILEMANAGER-1567199","tags":[],"sources":["cvelist","nvd"]},{"url":"https://github.com/UniSharp/laravel-filemanager/blob/master/src/Controllers/UploadController.php%23L26","tags":["broken-link","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/UniSharp/laravel-filemanager/releases/tag/v2.5.1","tags":[],"sources":["cvelist","nvd"]},{"url":"https://github.com/UniSharp/laravel-filemanager/issues/1113","tags":[],"sources":["cvelist","nvd"]},{"url":"https://github.com/UniSharp/laravel-filemanager/releases/tag/v2.6.2","tags":[],"sources":["cvelist","nvd"]},{"url":"https://snyk.io/vuln/SNYK-PHP-UNISHARPLARAVELFILEMANAGER-1567199","tags":["third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/UniSharp/laravel-filemanager/issues/1113#issuecomment-1812092975","tags":["web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-23814","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/UniSharp/laravel-filemanager/commit/bd84899ce65a7f193e676dd8444e424fa50f64fa","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/UniSharp/laravel-filemanager","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/UniSharp/laravel-filemanager/blob/master/src/Controllers/UploadController.php#L26","tags":["web"],"sources":["ghsa"]}],"credits":["Huy Nguyen"],"assigner":"snyk","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-23814","url":"https://www.cve.org/CVERecord?id=CVE-2021-23814","licence":"CVE Terms of Use","modified":"2025-06-17T11:38:06.941Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-f8x6-m9f5-ffp8","url":"https://github.com/advisories/GHSA-f8x6-m9f5-ffp8","licence":"CC-BY-4.0","modified":"2025-06-18T04:13:17.934Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-23814","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-23814","licence":"Public domain","modified":"2026-06-17T03:38:53.513Z"}],"updatedAt":"2026-11-25T22:58:06.073Z","epss":{"score":0.0183,"percentile":0.79486,"date":"2026-12-01T12:00:22.000Z"}}