Document Title: =============== Perch v3.0.3 CMS - Multiple Web Vulnerabilities References (Source): ==================== https://www.vulnerability-lab.com/get_content.php?id=2067 Release Date: ============= 2017-05-29 Vulnerability Laboratory ID (VL-ID): ==================================== 2067 Common Vulnerability Scoring System: ==================================== 3.8 Vulnerability Class: ==================== Arbitrary File Upload Product & Service Introduction: =============================== Perch is a content management system designed for small websites as a drop-in solution. Perch Runway a fully featured CMS for larger content driven sites. They share a template language and many features - the main difference is the types of projects they are each designed for. (Copy of the Homepage: https://docs.grabaperch.com ) Abstract Advisory Information: ============================== The Vulnerability Laboratory discovered an unrestricted file upload & stored cross site scripting web vulnerabilities in the Perch v3.0.3 Content Management System. Vulnerability Disclosure Timeline: ================================== 2017-05-29: Public Disclosure (Vulnerability Laboratory) Discovery Status: ================= Published Affected Product(s): ==================== Edgeofmyseat Product: Perch - Content Management System (Web-Application) 3.0.3 Exploitation Technique: ======================= Remote Severity Level: =============== Medium Technical Details & Description: ================================ An unrestricted file upload & stored cross site scripting vulnerabilities has been discovered in the official Perch v3.0.3 content management system. The security vulnerability is located in the `Asset Title` input field & `Select File` upload file of the vulnerable `Adding a New Asset` module POST method request. The `Asset Title` validation input field allows to execute any injected payload string code that is stored in the database management system. The `Select File` field is not parsed and allows a limited admin to upload unrestricted files to the web-server system. The security risk of the stored cross site scripting & unrestricted file upload vulnerability is estimated as medium (CVSS 3.8). Exploitation of the (non-persistent & persistent) input validation web vulnerability requires a privileged web-application user account and medium user interaction. Successful exploitation of the vulnerability results in session hijacking, non-persistent and persistent phishing attacks, non-persistent and persistent external redirects to malicious source, non-persistent and persistent manipulation of affected or connected application modules. Proof of Concept (PoC): ======================= The unrestricted file upload & stored cross site scripting web vulnerabilities can be exploited by remote attackers with privileged user account and with Medium user interaction. For security demonstration or to reproduce the vulnerability follow the provided information and steps below to continue. Manual steps to reproduce the vulnerability ... 1. Install Perch CMS Note: Your Account is a "Primary Admin" 2. Login to the web-application 3. Add " Limited Admin " with Admin Role 4. Add " UserLab " with Editor Role Log Out Your "Primary Admin" Account and Log in with "Limited Admin" Account 5. Go To ..assets/ 6. Add asset button 7. Create a MALICIOUS SCRIPT CODE EXECUTION Title 8. Upload any Malware or malicious file 9. Click on Submit button 10. Open The "UserLab & Primary Admin " Accounts 11. Go To Listing Assets 12. The execution of the vulnerability by an limited admin are Stored and published in all Users "Listing assets" module 13. Successful reproduce of the vulnerability! PoC: Attack Scheme : https://www.youtube.com/watch?v=klYQ6iXfjUI&feature=youtu.be PoC: LimitedAdmin - Asset Title => (http://Perch-cms.localhost:8080/perch/core/apps/assets/edit/?id=)
PoC: LimitedAdmin -Select File => (http://Perch-cms.localhost:8080/perch/core/apps/assets/edit/?id=) --- PoC Session Logs [POST] --- POST /perch/core/apps/assets/edit/ HTTP/1.1 Host: Perch-cms.localhost:8080 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:53.0) Gecko/20100101 Firefox/53.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Content-Type: multipart/form-data; boundary=---------------------------287332380928218 Content-Length: 1118 Referer: http://Perch-cms.localhost:8080/perch/core/apps/assets/edit/ Cookie: PHPSESSID=e6pok7gnvci66jb7noti2j0nu5; cmsa=1 Connection: keep-alive -----------------------------287332380928218: undefined Content-Disposition: form-data; name="resourceTitle" [ SCRIPT CODE EXECUTION! ] -----------------------------287332380928218 Content-Disposition: form-data; name="image"; filename="poc1.html" Content-Type: text/html [ Unrestricted "Malware&Malicious" FileUpload! ] [Malicious Site + IP Adress/Redirection + File]:=[download] -----------------------------287332380928218 Content-Disposition: form-data; name="image_field" 1 -----------------------------287332380928218 Content-Disposition: form-data; name="image_assetID" -----------------------------287332380928218 Content-Disposition: form-data; name="resourceBucket" default -----------------------------287332380928218 Content-Disposition: form-data; name="tags" -----------------------------287332380928218 Content-Disposition: form-data; name="btnsubmit" Submit -----------------------------287332380928218 Content-Disposition: form-data; name="formaction" edit -----------------------------287332380928218 Content-Disposition: form-data; name="token" 7860b50e7d1965fcc59ebf9c49be0034 -----------------------------287332380928218-- HTTP/1.1 200 OK Server: ****** Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache x-frame-options: deny X-XSS-Protection: 1; mode=block X-Content-Type-Options: nosniff Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html; charset=utf-8 PoC: Affected Accounts [+] Role : Primary Admin [+] Vulnerable Modules(s): Listing assets