UniSharp Laravel Filemanager Code Injection vulnerability
Versions of the package unisharp/laravel-filemanager before 2.9.1 are vulnerable to Remote Code Execution (RCE) through using a valid mimetype and inserting the . character after the php file extension. This allows the attacker to execute malicious code.
As published by the sources
Affected packages
- Affected
<2.9.1Fixed in2.9.1
Derived from the fixed versions above
What to do
Upgrade unisharp/laravel-filemanager to 2.9.1 or later.
composer update unisharp/laravel-filemanager --with-dependencies
To see which version you have installed, run composer show vendor/package. Running composer audit lists the known advisories that match your installed versions.
Quoted from the original advisory
Details
Versions of the package unisharp/laravel-filemanager before 2.9.1 are vulnerable to Remote Code Execution (RCE) through using a valid mimetype and inserting the . character after the php file extension. This allows the attacker to execute malicious code.
References
- Advisoryhttps://nvd.nist.gov/vuln/detail/CVE-2024-21546
- Webhttps://github.com/UniSharp/laravel-filemanager/commit/8170760c0ae316d77b9363cd4c76ab68d3f63f0b
- Webhttps://gist.github.com/ImHades101/338a06816ef97262ba632af9c78b78ca
- Packagehttps://github.com/UniSharp/laravel-filemanager
- Webhttps://security.snyk.io/vuln/SNYK-PHP-UNISHARPLARAVELFILEMANAGER-7210316