Critical Unauthenticated File Upload Vulnerability in Blueimp jQuery-File-Upload
Summary
CVE-2018-9206: Unauthenticated arbitrary file upload vulnerability in Blueimp jQuery-File-Upload. Affects libjs-jquery-file-upload across 2 version ranges.
< 9.25.0-1
< 39607fdaaba0dc11ba8c116ac2968e28e796f153
Fixed in 9.25.0-1. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Blueimp jQuery-File-Upload is a popular open-source library that enables file uploads via AJAX. It provides a user-friendly interface and supports multiple file uploads, drag-and-drop functionality, and progress bars. However, versions up to v9.22.0 are susceptible to an unauthenticated arbitrary file upload vulnerability, allowing attackers to upload malicious files without authentication.
Vulnerability Detail
The vulnerability (CVE-2018-9206) allows unauthenticated users to upload arbitrary files to the server, potentially leading to remote code execution, data breaches, and server compromise. This issue arises from inadequate validation of uploaded files, enabling attackers to exploit the file upload functionality. The severity of this vulnerability is underscored by its CVSS score of 9.8, indicating a critical risk to affected systems.
How To Fix
Minimum fixed version
9.25.0-1
This is the first release that contains the fix.
sudo apt-get install --only-upgrade libjs-jquery-file-upload
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
If an immediate upgrade is not feasible, consider implementing server-side validation to restrict file types and sizes. Additionally, configure your server to store uploaded files outside the web root to prevent direct access. Here is a sample server-side validation code snippet:
if ($_FILES['file']['error'] == UPLOAD_ERR_OK) {
$fileType = mime_content_type($_FILES['file']['tmp_name']);
if (in_array($fileType, ['image/jpeg', 'image/png'])) {
// Proceed with the upload
} else {
// Reject the upload
}
}
Conclusion
The unauthenticated arbitrary file upload vulnerability in Blueimp jQuery-File-Upload poses a significant risk to applications using affected versions. Immediate action is required to upgrade the library or implement workarounds to secure your application against potential exploitation.
See every vulnerability recorded for libjs-jquery-file-upload →
FAQ
CVE-2018-9206 is a vulnerability in Blueimp jQuery-File-Upload that allows unauthenticated users to upload arbitrary files.
The risks include unauthorized file uploads, potential remote code execution, and data breaches.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability.
Upgrade the Blueimp jQuery-File-Upload library to version 9.25.0-1 or later to mitigate the vulnerability.
Yes, Vulert can monitor and alert you in real-time for open-source vulnerabilities using just a manifest file like package-lock.json.
References
Related vulnerabilities
Recent vulnerabilities recorded for libjs-jquery-file-upload.