Junglewise Threat Intelligence

CVE-2018-9206: blueimp jQuery File Upload arbitrary file upload

CVE-2018-9206 · Severity: low · CVSS 3.1 · Published 2018-10-22

Technologies: Blueimp Jquery-File-Upload. Vendors: npm.

Executive brief

blueimp jQuery File Upload is a popular JavaScript library used to handle file uploads in web applications. Versions up to 9.22.0 allow unauthenticated attackers to upload arbitrary files to the server with no restrictions, enabling them to upload malicious scripts (such as PHP webshells) that execute on the server and compromise the entire application or underlying system.

Technical details

The vulnerability is a CWE-434 unrestricted file upload weakness in blueimp jQuery File Upload through version 9.22.0. The sample PHP upload handler (UploadHandler.php or index.php in /server/php/) does not properly validate or restrict file types before processing uploads. Due to a default Apache 2.3.9+ configuration where .htaccess override rules may be disabled, PHP files uploaded to the widget's /files/ directory are directly executable. An unauthenticated attacker can send a POST request with a multipart/form-data payload containing a malicious PHP script to the upload endpoint, and the file is written to disk with no restrictions. The attacker can then directly access the uploaded script via HTTP GET, resulting in arbitrary code execution on the server with the privileges of the web server process. The vulnerability has been exploited in the wild since at least 2015. Patch version 9.22.1 addresses this issue.

Affected products

  • blueimp jQuery-File-Upload <= 9.22.0

Timeline

  • 2018-10: disclosed: Publicly disclosed to vendor in October 2018; advisory published October 22, 2018
  • 2018: patched: Fix released in version 9.22.1
  • 2015: exploited: Vulnerability actively exploited in the wild since at least 2015

References