{"id":"CVE-2021-23814","aliases":["EUVD-2022-0578","GHSA-f8x6-m9f5-ffp8","SNYK-PHP-UNISHARPLARAVELFILEMANAGER-1567199"],"status":"published","title":"Unrestricted Upload of File with Dangerous Type in unisharp/laravel-filemanager","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.\r\rAn attacker may be able to reproduce the following steps:\r\r1. Install a package with a web Laravel application.\r2. Navigate to the Upload window\r3. Upload an image file, then capture the request\r4. Edit the request contents with a malicious file (webshell)\r5. Enter the path of file uploaded on URL - Remote Code Execution\r\r\r**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).","severity":{"version":"3.1","score":6.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:L/E:P","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-12","score":0.0183,"percentile":0.79171,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-434","CWE-94"],"published":"2021-12-17T20:00:14Z","modified":"2026-10-20T10:53:38Z","fixes":[{"ecosystem":"Packagist","package":"unisharp/laravel-filemanager","fixed_in":["2.6.2"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"Packagist","package":"unisharp/laravel-filemanager","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.6.2"}]}]},{"source":"osv","ecosystem":"Packagist","package":"unisharp/laravel-filemanager","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.6.2"}]}],"versions":["0.1.0","0.2.0","0.3.0","0.3.1","0.5.0","0.5.1","0.5.2","0.5.3","1.0.0","1.1.0","1.1.0-alpha","1.1.1","1.2.0","1.3.0-alpha","1.4.0-alpha","1.5.0","1.5.1","1.5.2","1.6.0","1.6.1","1.6.2","1.6.3","1.6.4","v1.7-alpha","v1.7.0","v1.7.1","v1.7.2","v1.7.3","v1.7.4","v1.7.5","v1.7.6","v1.7.7","v1.8.0","v1.8.1","v1.8.2","v1.8.2-alpha","v1.8.2.1","v1.8.2.2","v1.8.3","v1.8.4","v1.8.5","v1.9.0","v1.9.1","v1.9.2","v2.0.0","v2.0.0-alpha","v2.0.0-alpha2","v2.0.0-alpha3","v2.0.0-alpha4","v2.0.0-alpha5","v2.0.0-alpha6","v2.0.0-alpha7","v2.0.0-alpha8","v2.0.1","v2.1.0","v2.2.0","v2.3.0","v2.4.0","v2.4.1","v2.5.0","v2.5.1","v2.6.0","v2.6.1"]}],"products":[{"vendor":"unisharp","product":"laravel-filemanager"}],"references":[{"url":"https://security.snyk.io/vuln/SNYK-PHP-UNISHARPLARAVELFILEMANAGER-1567199","tags":["web"]},{"url":"https://github.com/UniSharp/laravel-filemanager/blob/master/src/Controllers/UploadController.php%23L26","tags":["x_transferred","Broken Link","Third Party Advisory","advisory","web"]},{"url":"https://github.com/UniSharp/laravel-filemanager/releases/tag/v2.5.1","tags":["web"]},{"url":"https://github.com/UniSharp/laravel-filemanager/issues/1113","tags":["report"]},{"url":"https://github.com/UniSharp/laravel-filemanager/releases/tag/v2.6.2","tags":["web"]},{"url":"https://snyk.io/vuln/SNYK-PHP-UNISHARPLARAVELFILEMANAGER-1567199","tags":["x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://github.com/UniSharp/laravel-filemanager/issues/1113#issuecomment-1812092975","tags":["x_transferred","report","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-23814","tags":["advisory"]},{"url":"https://github.com/UniSharp/laravel-filemanager/commit/bd84899ce65a7f193e676dd8444e424fa50f64fa","tags":["web"]},{"url":"https://github.com/UniSharp/laravel-filemanager/blob/master/src/Controllers/UploadController.php#L26","tags":["web"]},{"url":"https://github.com/advisories/GHSA-f8x6-m9f5-ffp8"},{"url":"https://github.com/UniSharp/laravel-filemanager","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2021-23814","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.\r\rAn attacker may be able to reproduce the following steps:\r\r1. Install a package with a web Laravel application.\r2. Navigate to the Upload window\r3. Upload an image file, then capture the request\r4. Edit the request contents with a malicious file (webshell)\r5. Enter the path of file uploaded on URL - Remote Code Execution\r\r\r**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).","status":"published","published":"2021-12-17T20:00:14.149Z","modified":"2025-06-17T11:38:06.941Z","cvss":[{"version":"3.1","score":6.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:L/E:P","level":"medium","assessor":"cna"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T14:33:00.819444Z"}],"euvd":[{"id":"EUVD-2022-0578","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.\r\rAn attacker may be able to reproduce the following steps:\r\r1. Install a package with a web Laravel application.\r2. Navigate to the Upload window\r3. Upload an image file, then capture the request\r4. Edit the request contents with a malicious file (webshell)\r5. Enter the path of file uploaded on URL - Remote Code Execution\r\r\r**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).","status":"published","published":"2021-12-17T20:00:14Z","modified":"2025-06-17T11:38:06Z","cvss":[{"version":"3.1","score":6.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:L/E:P","level":"medium"}],"updated_at":"2026-11-02T20:32:23.224988Z"}],"ghsa":[{"id":"GHSA-f8x6-m9f5-ffp8","title":"Unrestricted Upload of File with Dangerous Type in unisharp/laravel-filemanager","description":"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).","status":"published","published":"2022-01-06T21:08:34Z","modified":"2024-04-22T19:10:22Z","cvss":[{"version":"3.1","score":6.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:L","level":"medium"}],"cwes":["CWE-434"],"updated_at":"2026-11-02T14:37:44.335614Z"}],"nvd":[{"id":"CVE-2021-23814","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.\r\rAn attacker may be able to reproduce the following steps:\r\r1. Install a package with a web Laravel application.\r2. Navigate to the Upload window\r3. Upload an image file, then capture the request\r4. Edit the request contents with a malicious file (webshell)\r5. Enter the path of file uploaded on URL - Remote Code Execution\r\r\r**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).","status":"published","published":"2021-12-17T20:15:08.34Z","modified":"2026-06-17T03:38:53.513Z","cvss":[{"version":"3.1","score":6.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:L","level":"medium","assessor":"secondary"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"primary"},{"version":"2.0","score":6.5,"vector":"AV:N/AC:L/Au:S/C:P/I:P/A:P","level":"medium","assessor":"primary"}],"cwes":["CWE-94","CWE-434"],"updated_at":"2026-11-02T14:07:02.566991Z"}],"osv":[{"id":"CVE-2021-23814","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.\r\rAn attacker may be able to reproduce the following steps:\r\r1. Install a package with a web Laravel application.\r2. Navigate to the Upload window\r3. Upload an image file, then capture the request\r4. Edit the request contents with a malicious file (webshell)\r5. Enter the path of file uploaded on URL - Remote Code Execution\r\r\r**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).","status":"published","published":"2021-12-17T20:15:08.34Z","modified":"2026-10-20T10:53:38.110045758Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:44:18.778776Z"},{"id":"GHSA-f8x6-m9f5-ffp8","title":"Unrestricted Upload of File with Dangerous Type in unisharp/laravel-filemanager","description":"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).","status":"published","published":"2022-01-06T21:08:34Z","modified":"2025-06-18T04:13:17.934264Z","cvss":[{"version":"3.1","score":6.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:L","level":"medium"}],"cwes":["CWE-434"],"updated_at":"2026-11-02T15:46:46.006631Z"}]}}
