Document Title: =============== Magento Bug Bounty #19 - Persistent Filename Vulnerability References (Source): ==================== ID: APPSEC-1059 Release Date: ============= 2015-09-11 Vulnerability Laboratory ID (VL-ID): ==================================== 1570 Common Vulnerability Scoring System: ==================================== 3.9 Product & Service Introduction: =============================== Magento is an open source e-commerce web application that was launched on March 31, 2008 under the name Bento. It was developed by Varien (now Magento, a division of eBay) with help from the programmers within the open source community but is now owned solely by eBay Inc. Magento was built using parts of the Zend Framework. It uses the entity-attribute-value (EAV) database model to store data. In November 2013, W3Techs estimated that Magento was used by 0.9% of all websites. Our team of security professionals works hard to keep Magento customer information secure. What`s equally important to protecting this data? Our security researchers and user community. If you find a site that isn`t following our policies, or a vulnerability inside our system, please tell us right away. ( Copy of the Vendor Homepage: & ) Abstract Advisory Information: ============================== The Vulnerability Laboratory Research Team discovered an application-side file input validation web vulnerability in the official Magento Commerce online service web-application. Vulnerability Disclosure Timeline: ================================== 2015-08-13: Researcher Notification & Coordination (Hadji Samir - Evolution Security GmbH) 2015-08-14: Vendor Notification (Magento Security Team - Bug Bounty Program) 2015-08-22: Vendor Response/Feedback (Magento Security Team - Bug Bounty Program) 2015-09-05: Vendor Fix/Patch (Magento Developer Team) 2015-09-10: Bug Bounty Reward (Magento Security Team - Bug Bounty Program) 2015-09-11: Public Disclosure (Vulnerability Laboratory) Discovery Status: ================= Published Exploitation Technique: ======================= Remote Severity Level: =============== Medium Technical Details & Description: ================================ An application-side web vulnerability has been discovered in the official Magento Commerce online service web-application. The vulnerability allows an remote attacker to inject own script code to the application-side of the affected application module. The web vulnerability is located in the `filename and files` value of the `/products/bug-tracking/report/saveIssue/` module. Remote attackers are able to inject own files with malicious `files & filename` value via `upload` POST method request to compromise the magento commerce web-application. Remote attackers are also able to exploit the filename issue in combination with persistent injected script codes to execute different malicious attack requests. The attack vector is located on the application-side of the magento service and the request method to inject is POST. The issue is remotly exploitable after approval with two test accounts. The sender and receiver of the ticket is affected by the issue itself. Another issue is that the filename upload has no secure restriction of the name value. Thus can result in upload of multiple malicious file extensions to remotly elevate user privileges by malicious interaction. (arbitrary file upload - multiple extensions) The security risk of the application-side web vulnerability is estimated as medium with a cvss (common vulnerability scoring system) count of 3.9. Exploitation of the application-side validation web vulnerability requires no user interaction and only a low privileged web-application user account. Successful exploitation of the security vulnerability results in the ubnt community web-application compromise. Request Method(s): [+] [POST] Vulnerable Domain(s): [+] Vulnerable Module(s): [+] /products/bug-tracking/report/saveIssue/ Vulnerable Parameter(s): [+] filename [+] files Affected Module(s): [+] /saveIssue/ Proof of Concept (PoC): ======================= The vulnerability can be exploited by remote attackers with low privilege application user account and only low user interaction (click). For security demonstration or to reproduce the vulnerability follow the provided information and steps below to continue. Manual steps to reproduce the vulnerability ... 1. Login in magento website 2. Go to 3. Create to Report an Issues 4. Upload a file with a payload script code (code injection) as filename via POST 5. Report the issue and the payload code will execute 6. Successful reproduce of the remote vulnerability in the filename value! PoC: Source Attachments: ">