From e7955fc06438cfa3e93cfbf00291958fceb3d4ed Mon Sep 17 00:00:00 2001 From: Jacques Le Roux Date: Fri, 4 Feb 2022 04:30:13 +0100 Subject: [PATCH] Fixed: Remote Code Execution (File Upload) Vulnerability (OFBIZ-11948) Lion Tree has reported us that "CVE-2020-1938 is not fully fixed". Though it was fixed by OFBIZ-11407, it still possible for an authenticated user to upload a webshell included in an image using one of the upload possibilities in OFBiz. That is not new and covered by OFBIZ-12080 "Secure the uploads", but was still incomplete. This enforces the secured uploads by * checking in SecuredUpload::isValidImageFile that a webshell is not embedded in an image. * Keeping only "<%" as a denied token for JSP webshells, instead of currently "<%@ page" * Adds "application/text/x-ruby" to SecuredUpload::isExecutable Also * Adds ",,