Ecosyste.ms: Advisories
An open API service providing security vulnerability metadata for many open source software ecosystems.
Security Advisories: GSA_kwCzR0hTQS1mOHg2LW05ZjUtZmZwOM0c3g
Unrestricted Upload of File with Dangerous Type in unisharp/laravel-filemanager
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.
An attacker may be able to reproduce the following steps:
- Install a package with a web Laravel application.
- Navigate to the Upload window
- Upload an image file, then capture the request
- Edit the request contents with a malicious file (webshell)
- 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 the here.
Permalink: https://github.com/advisories/GHSA-f8x6-m9f5-ffp8JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1mOHg2LW05ZjUtZmZwOM0c3g
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Moderate
Classification: General
Published: almost 3 years ago
Updated: 7 months ago
CVSS Score: 6.7
CVSS vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:L
Identifiers: GHSA-f8x6-m9f5-ffp8, CVE-2021-23814
References:
- https://nvd.nist.gov/vuln/detail/CVE-2021-23814
- https://snyk.io/vuln/SNYK-PHP-UNISHARPLARAVELFILEMANAGER-1567199
- https://github.com/UniSharp/laravel-filemanager/issues/1113#issuecomment-1812092975
- https://github.com/UniSharp/laravel-filemanager/commit/bd84899ce65a7f193e676dd8444e424fa50f64fa
- 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://github.com/advisories/GHSA-f8x6-m9f5-ffp8
Blast Radius: 22.8
Affected Packages
packagist:unisharp/laravel-filemanager
Dependent packages: 102Dependent repositories: 2,559
Downloads: 2,634,191 total
Affected Version Ranges: < 2.6.2
Fixed in: 2.6.2
All affected 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.1, 1.2.0, 1.5.0, 1.5.1, 1.5.2, 1.6.0, 1.6.1, 1.6.2, 1.6.3, 1.6.4, 1.7.0, 1.7.1, 1.7.2, 1.7.3, 1.7.4, 1.7.5, 1.7.6, 1.7.7, 1.8.0, 1.8.1, 1.8.2, 1.8.3, 1.8.4, 1.8.5, 1.9.0, 1.9.1, 1.9.2, 2.0.0, 2.0.1, 2.1.0, 2.2.0, 2.3.0, 2.4.0, 2.4.1, 2.5.0, 2.5.1, 2.6.0, 2.6.1
All unaffected versions: 2.6.2, 2.6.3, 2.6.4, 2.7.0, 2.7.1, 2.8.0, 2.8.1, 2.9.0, 2.9.1