# CVE-2021-23814: Unrestricted Upload of File with Dangerous Type in unisharp/laravel-filemanager

- Severity: Medium 6.7 (CVSS:3.1, scored by snyk) `CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:L/E:P`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.83%, higher than 79% of CVEs (2026-12-01)
- Published: 2021-12-17T20:00:14.149Z
- Modified: 2026-06-17T03:38:53.513Z
- Also known as: GHSA-f8x6-m9f5-ffp8, SNYK-PHP-UNISHARPLARAVELFILEMANAGER-1567199
- Weaknesses: CWE-94, CWE-434
- Assigned by: snyk

## 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).

(As written by CVE List.)

## Affected

- unisharp/laravel-filemanager: before 2.6.2
- unisharp/laravel-filemanager (Packagist): before 2.6.2
- unisharp laravel-filemanager: from 0.0.0

## Every score

- snyk: CVSS:3.1 6.7 Medium `CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:L/E:P`
- GitHub: CVSS:3.1 6.7 Medium `CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:L`
- NVD: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 6.5 Medium `AV:N/AC:L/Au:S/C:P/I:P/A:P`

## References

- <https://security.snyk.io/vuln/SNYK-PHP-UNISHARPLARAVELFILEMANAGER-1567199>
- <https://github.com/UniSharp/laravel-filemanager/blob/master/src/Controllers/UploadController.php%23L26> (broken-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-1567199> (third-party-advisory, web)
- <https://github.com/UniSharp/laravel-filemanager/issues/1113#issuecomment-1812092975> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-23814> (advisory)
- <https://github.com/UniSharp/laravel-filemanager/commit/bd84899ce65a7f193e676dd8444e424fa50f64fa> (web)
- <https://github.com/UniSharp/laravel-filemanager> (package)
- <https://github.com/UniSharp/laravel-filemanager/blob/master/src/Controllers/UploadController.php#L26> (web)

## Sources

- CVE List: [CVE-2021-23814](https://www.cve.org/CVERecord?id=CVE-2021-23814), CVE Terms of Use, modified 2025-06-17
- GitHub Advisory Database: [GHSA-f8x6-m9f5-ffp8](https://github.com/advisories/GHSA-f8x6-m9f5-ffp8), CC-BY-4.0, modified 2025-06-18
- NVD: [CVE-2021-23814](https://nvd.nist.gov/vuln/detail/CVE-2021-23814), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-23814 · Whole record: https://cve.day/CVE-2021-23814.json · Rebuilt by cve.day 2026-11-25T22:58:06.073Z
