{"id":1056351,"date":"2016-01-14T21:18:58","date_gmt":"2016-01-15T05:18:58","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/security-issue-insufficient-file-upload-validation\/"},"modified":"2016-02-18T08:34:25","modified_gmt":"2016-02-18T16:34:25","slug":"security-issue-insufficient-file-upload-validation","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/security-issue-insufficient-file-upload-validation\/","title":{"rendered":"File uploads"},"content":{"rendered":"<p>Hi,<\/p>\n<p>We have recently had a security firm audit our website.<br \/>\nOne of the points they raised was with the validation of the file upload on the &#8220;Add Event&#8221; page.<br \/>\nI&#8217;ll include what they provided as it&#8217;s explains it perfectly.<br \/>\nCan you please let me know if this is something that can be looked at?<\/p>\n<p>Cheers!<\/p>\n<p><strong>Description<\/strong><br \/>\nInsufficient File Upload Validation: The application does not perform sufficient validation on uploaded files. Unauthenticated attackers may upload malicious files which may be used to gain access to the application. Additionally, a lack of rate-limiting controls could result in.<\/p>\n<p><strong>Additional Details<\/strong><br \/>\nThe &#8216;add event&#8217; functionality allows any unauthenticated users to upload files. There exists a filter for .jpg, .gif and .png image files, however the application was found to accept .php.&lt;jpg\/gif\/png&gt;, and .jpg&#8217;s with embedded php code. Although execution of the arbitrary shell files were denied, no validation was performed and they were successfully uploaded and accessible via their storage location on the web server.<\/p>\n<p><strong>Recommendation<\/strong><br \/>\nRestrict uploaded files to a whitelist of file types and extensions. Cater for pre-extensions such as file.php.jpg. Perform a scan of content uploaded to the file for both malware and HTML code where possible. Configure the storage folders to deny execution rights and prevent direct access to these folders. Consider only allowing the upload\/event creation functionality to authenticated users, and renaming files stored on the server or appending text to them when possible.<\/p>\n","protected":false},"template":"","class_list":["post-1056351","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>File uploads -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/security-issue-insufficient-file-upload-validation\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"File uploads -\" \/>\n<meta property=\"og:description\" content=\"Hi, We have recently had a security firm audit our website. One of the points they raised was with the validation of the file upload on the &#8220;Add Event&#8221; page. I&#8217;ll include what they provided as it&#8217;s explains it perfectly. Can you please let me know if this is something that can be looked at? [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/security-issue-insufficient-file-upload-validation\/\" \/>\n<meta property=\"article:modified_time\" content=\"2016-02-18T16:34:25+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/security-issue-insufficient-file-upload-validation\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/security-issue-insufficient-file-upload-validation\/\",\"name\":\"File uploads -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2016-01-15T05:18:58+00:00\",\"dateModified\":\"2016-02-18T16:34:25+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/security-issue-insufficient-file-upload-validation\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/security-issue-insufficient-file-upload-validation\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/security-issue-insufficient-file-upload-validation\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Calendar Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Community Events\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/community-events\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"File uploads\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"File uploads -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/security-issue-insufficient-file-upload-validation\/","og_locale":"en_US","og_type":"article","og_title":"File uploads -","og_description":"Hi, We have recently had a security firm audit our website. One of the points they raised was with the validation of the file upload on the &#8220;Add Event&#8221; page. I&#8217;ll include what they provided as it&#8217;s explains it perfectly. Can you please let me know if this is something that can be looked at? [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/security-issue-insufficient-file-upload-validation\/","article_modified_time":"2016-02-18T16:34:25+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/security-issue-insufficient-file-upload-validation\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/security-issue-insufficient-file-upload-validation\/","name":"File uploads -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2016-01-15T05:18:58+00:00","dateModified":"2016-02-18T16:34:25+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/security-issue-insufficient-file-upload-validation\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/security-issue-insufficient-file-upload-validation\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/security-issue-insufficient-file-upload-validation\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Calendar Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/"},{"@type":"ListItem","position":4,"name":"Community Events","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/community-events\/"},{"@type":"ListItem","position":5,"name":"File uploads"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1056351","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":2,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1056351\/revisions"}],"predecessor-version":[{"id":1056619,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1056351\/revisions\/1056619"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1056351"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}