Fixed: CVE-2021-37608 vulnerability bypass (OFBIZ-12307)
The fix I did is two folds: filters extensions (thanks to Zhujie's suggestion of a list of extensions to ban) deletes bad files at the right place (thanks to thiscodecc's report) Thanks: thiscodecc for the security report
This commit is contained in:
@@ -151,7 +151,7 @@ SameSiteCookieAttribute=
|
||||
templateClassResolver=
|
||||
|
||||
|
||||
#-- UPLOAD: supported file formats are *safe* PNG, GIF, TIFF, JPEG, PDF, Audio and Video and ZIP
|
||||
#-- ===== UPLOAD: supported file formats are *safe* PNG, GIF, TIFF, JPEG, PDF, Audio and Video and ZIP
|
||||
#--
|
||||
#-- No proprietary file formats (Excel, Word, etc.) are handled OOTB.
|
||||
#-- They can be handled by custom projects using https://github.com/righettod/document-upload-protection:
|
||||
@@ -174,6 +174,10 @@ templateClassResolver=
|
||||
#-- For text files, the philosophy is we can't presume of all possible text contents used for attacks with payloads
|
||||
#-- At least there is an easy way to prevent them in SecuredUpload::isValidTextFile
|
||||
#--
|
||||
#-- List of denied files suffixes to be uploaded
|
||||
#-- OFBiz of course also check contents...
|
||||
deniedFileExtensions=html,htm,php,php2,hph3,php4,php5,asp,aspx,ascx,jsp,jspx,cfm,cfc,bat,exe,com,dll,vbs,js,reg,cgi,htaccess,asis,sh,phtm,shtm,inc,asp,cdx,asa,cer,py,pl,shtml,hta,ps1
|
||||
#--
|
||||
#-- The upload vulnerability is only a post-auth (needs a credential with suitable permissions),
|
||||
#-- people may like to allow more than what is allowed OOTB
|
||||
#-- As it name says, allowAllUploads opens all possibilities
|
||||
|
||||
Reference in New Issue
Block a user