{"id":"CVE-2021-23814","state":"PUBLISHED","title":"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 ","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).","publishedAt":"2021-12-17T20:00:14.149Z","updatedAt":"2025-06-17T11:38:06.941Z","severity":{"score":6.7,"label":"Medium","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:L/E:P","source":"snyk"},"assigner":"snyk","products":["n/a unisharp/laravel-filemanager"],"affected":[{"vendor":"n/a","product":"unisharp/laravel-filemanager","versions":[{"version":"0","status":"affected","lessThan":"2.6.2","versionType":"semver"}]}],"references":["https://security.snyk.io/vuln/SNYK-PHP-UNISHARPLARAVELFILEMANAGER-1567199","https://github.com/UniSharp/laravel-filemanager/blob/master/src/Controllers/UploadController.php%23L26","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-1567199","https://github.com/UniSharp/laravel-filemanager/issues/1113#issuecomment-1812092975"],"weaknesses":["CWE-94"],"ingestedAt":"2026-10-29T19:48:04.982Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2021/23xxx/CVE-2021-23814.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2021-23814","state":"PUBLISHED","datePublished":"2021-12-17T20:00:14.149Z","dateUpdated":"2025-06-17T11:38:06.941Z","assignerShortName":"snyk","assignerOrgId":"bae035ff-b466-4ff4-94d0-fc9efd9e1730","dateReserved":"2021-01-08T00:00:00.000Z"},"containers":{"cna":{"descriptions":[{"lang":"en","value":"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)."}],"affected":[{"vendor":"n/a","product":"unisharp/laravel-filemanager","versions":[{"version":"0","status":"affected","lessThan":"2.6.2","versionType":"semver"}]}],"references":[{"url":"https://security.snyk.io/vuln/SNYK-PHP-UNISHARPLARAVELFILEMANAGER-1567199"},{"url":"https://github.com/UniSharp/laravel-filemanager/blob/master/src/Controllers/UploadController.php%23L26"},{"url":"https://github.com/UniSharp/laravel-filemanager/releases/tag/v2.5.1"},{"url":"https://github.com/UniSharp/laravel-filemanager/issues/1113"},{"url":"https://github.com/UniSharp/laravel-filemanager/releases/tag/v2.6.2"}],"metrics":[{"cvssV3_1":{"version":"3.1","attackVector":"NETWORK","attackComplexity":"HIGH","exploitCodeMaturity":"PROOF_OF_CONCEPT","privilegesRequired":"LOW","userInteraction":"REQUIRED","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"LOW","baseScore":6.7,"baseSeverity":"MEDIUM","vectorString":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:L/E:P"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-94","description":"Arbitrary File Upload","lang":"en"}]}],"providerMetadata":{"shortName":"snyk","orgId":"bae035ff-b466-4ff4-94d0-fc9efd9e1730","dateUpdated":"2025-06-17T11:38:06.941Z"},"credits":[{"value":"Huy Nguyen","lang":"en"}]},"adp":[{"title":"CVE Program Container","references":[{"url":"https://snyk.io/vuln/SNYK-PHP-UNISHARPLARAVELFILEMANAGER-1567199","tags":["x_transferred"]},{"url":"https://github.com/UniSharp/laravel-filemanager/blob/master/src/Controllers/UploadController.php%23L26","tags":["x_transferred"]},{"url":"https://github.com/UniSharp/laravel-filemanager/issues/1113#issuecomment-1812092975","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-03T19:14:08.890Z"}}]}}}