{"id":"CVE-2021-23814","aliases":["GHSA-f8x6-m9f5-ffp8","SNYK-PHP-UNISHARPLARAVELFILEMANAGER-1567199"],"url":"https://o3.security/vulnerability/CVE-2021-23814","summary":"Unrestricted Upload of File with Dangerous Type in unisharp/laravel-filemanager","details":"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).","published":"2021-12-17T20:15:08.340Z","modified":"2026-07-08T05:57:07.870517295Z","cvss":{"score":8.8,"severity":"HIGH","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"},"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Packagist","name":"unisharp/laravel-filemanager","fixedVersion":"2.6.2"}],"fix":{"url":"https://github.com/UniSharp/laravel-filemanager/commit/bd84899ce65a7f193e676dd8444e424fa50f64fa","label":"UniSharp/laravel-filemanager@bd84899"},"references":[{"type":"WEB","url":"https://github.com/UniSharp/laravel-filemanager/releases/tag/v2.5.1"},{"type":"WEB","url":"https://github.com/UniSharp/laravel-filemanager/releases/tag/v2.6.2"},{"type":"WEB","url":"https://security.snyk.io/vuln/SNYK-PHP-UNISHARPLARAVELFILEMANAGER-1567199"},{"type":"ADVISORY","url":"https://github.com/UniSharp/laravel-filemanager/blob/master/src/Controllers/UploadController.php%23L26"},{"type":"ADVISORY","url":"https://snyk.io/vuln/SNYK-PHP-UNISHARPLARAVELFILEMANAGER-1567199"},{"type":"REPORT","url":"https://github.com/UniSharp/laravel-filemanager/issues/1113"},{"type":"REPORT","url":"https://github.com/UniSharp/laravel-filemanager/issues/1113#issuecomment-1812092975"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-23814"},{"type":"WEB","url":"https://github.com/UniSharp/laravel-filemanager/commit/bd84899ce65a7f193e676dd8444e424fa50f64fa"},{"type":"PACKAGE","url":"https://github.com/UniSharp/laravel-filemanager"},{"type":"WEB","url":"https://github.com/UniSharp/laravel-filemanager/blob/master/src/Controllers/UploadController.php#L26"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-07-08T05:57:07.870517295Z"}}