# Unrestricted Upload of File with Dangerous Type in unisharp/laravel-filemanager

Advisory record · `GHSA-f8x6-m9f5-ffp8`

- **Identifiers:** `GHSA-f8x6-m9f5-ffp8` · `CVE-2021-23814` · `PKSA-m1ns-x448-8pmp` · `SNYK-PHP-UNISHARPLARAVELFILEMANAGER-1567199`
- **State:** Confirmed
- **Severity:** CVSS 6.7 Medium
- **Critical:** No
- **Weakness (CWE):** [CWE-94](https://cwe.mitre.org/data/definitions/94.html) · [CWE-434](https://cwe.mitre.org/data/definitions/434.html)
- **Tags:** [Code injection](https://agentprime.io/advisories/tag/code-injection.md) · [Unrestricted file upload](https://agentprime.io/advisories/tag/file-upload.md)
- **Published:** 6 Jan 2022
- **Updated:** 18 Jun 2025
- **Reviewed by a person:** No

Published by the GitHub Advisory Database at 6 Jan 2022, 21:08 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

## Affected packages

- `unisharp/laravel-filemanager` (Packagist): affected `<2.6.2`; fixed in `2.6.2`

## Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

> Versions of unisharp/laravel-filemanager before 2.6.2 do not sufficiently validate file types on upload through the upload() function. An attacker who can reach the upload window of a Laravel application using this package can upload a malicious script in place of an image and then request it by path, which may allow remote code execution. Upgrade to 2.6.2 or later. As a workaround, restrict permitted file extensions with a whitelist in the package's lfm.php config file.

Written 3 Nov 2026.

## Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

## Severity and exploitation

- 6.7 Medium, CVSS 3.1: `CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:L/E:P`, from CNA (snyk)

- **CISA KEV:** Not listed.
- **EPSS:** 0.018, the 79th percentile, on 16 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

- 31 Oct 2026, 14:27 UTC: First seen by agentprime
- 31 Oct 2026, 14:27 UTC: [Confirmed by OSV](https://osv.dev/vulnerability/GHSA-f8x6-m9f5-ffp8)

## Sources

- [GitHub Advisory Database: GHSA-f8x6-m9f5-ffp8](https://github.com/advisories/GHSA-f8x6-m9f5-ffp8)
- [OSV: GHSA-f8x6-m9f5-ffp8](https://osv.dev/vulnerability/GHSA-f8x6-m9f5-ffp8)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-23814>
- <https://github.com/UniSharp/laravel-filemanager/issues/1113#issuecomment-1812092975>
- <https://github.com/UniSharp/laravel-filemanager/commit/bd84899ce65a7f193e676dd8444e424fa50f64fa>
- <https://github.com/UniSharp/laravel-filemanager>
- <https://github.com/UniSharp/laravel-filemanager/blob/master/src/Controllers/UploadController.php#L26>
- <https://github.com/UniSharp/laravel-filemanager/blob/master/src/Controllers/UploadController.php%23L26>
- <https://snyk.io/vuln/SNYK-PHP-UNISHARPLARAVELFILEMANAGER-1567199>

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.

## Check whether this affects you

A Match means an installed version is in the affected range above. Most don’t affect the app; agentprime hasn’t analysed this one yet.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), ask your agent to check the project: `check_lockfile` sends a lockfile, `check_packages` a list of installed packages, and both return the Matches and the upgrades that clear them. `get_advisory` returns this record. Setup: <https://agentprime.io/mcp.md>
- In a browser: <https://agentprime.io/check/> reads your lockfile in the browser, never uploading it.
- Whether it touches your code, with file and line: the Claude Code plugin, <https://agentprime.io/plugin.md>
- As JSON: <https://api.agentprime.io/v1/advisories/GHSA-f8x6-m9f5-ffp8>, or `POST https://api.agentprime.io/v1/match` with your packages (<https://agentprime.io/api.md>)

---

The web page: <https://agentprime.io/advisories/GHSA-f8x6-m9f5-ffp8/>. Everything for agents: <https://agentprime.io/llms.txt>.
