Document Title: =============== Ebay Magento Bug Bounty #6 - Persistent Mail Web Vulnerability References (Source): ==================== http://www.vulnerability-lab.com/get_content.php?id=1393 EIBBP-31097 Release Date: ============= 2015-06-01 Vulnerability Laboratory ID (VL-ID): ==================================== 1393 Common Vulnerability Scoring System: ==================================== 3.3 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: http://magento.com/security & http://magento.com/security ) Abstract Advisory Information: ============================== The Vulnerability Laboratory Research Team discovered a persistent mail encoding web vulnerability in the official Magento Website Web-Application (Framework). Vulnerability Disclosure Timeline: ================================== 2015-06-02: Public Disclosure (Vulnerability Laboratory) Discovery Status: ================= Published Affected Product(s): ==================== Ebay Inc. Product: Magento - Web Application Service 2015 Q1 Exploitation Technique: ======================= Remote Severity Level: =============== Low Technical Details & Description: ================================ An application-side mail encoding web vulnerability has been discovered in the official Magento Website Web-Application (Framework). The vulnerability allows remote attackers to bypass the web validation to compromise service mails by persistent script code injection. The persistent vulnerability is located in the `name` value of the http://magento.com/training/catalog/fundamentals-of-magento-development website web-application. The context validation vulnerability itself is located in the firstname and lastname values of the site registration module. Remote attackers are able to inject malicious payloads (script code) to the firstname and lastname input fields of the registration (POST). The remote vulnerability can be exploited by remote attackers or with automatic post scripts to send customers, clients and other random people malicious mails with injected script codes by the trusted magento mail server. The attack vector is persistent on the application-side and the request method to inject the payload is POST. The security risk of the vulnerability is estimated as medium but the issue affects the full developer event web-server. The validation of the server does not encode the payload to prevent an execution on registration and fails to parse in the second instance (send mailings) the database names. The magento panel itself is not affected by the validation issue but the feature to register with special chars should be permanently blocked to prevent. The security risk of the persistent mail encoding web vulnerability is estimated as medium with a cvss (common vulnerability scoring system) count of 3.3. Exploitation of the web vulnerability requires a low privileged web-application user account (unverified registration) and low or medium user interaction. Successful exploitation of the vulnerability results in session hijacking, persistent phishing, persistent external redirect and persistent manipulation of web header mail context. Request Method(s): [+] POST Vulnerable Domain(s): [+] Magento - (magento.com) Vulnerable Service(s): [+] Developer (Event) - Registration Vulnerable Parameter(s): [+] name Affected Sender(s): [+] info@magento.com Note: The issue is not connected to the already reported mail encoding issues affecting the partners and go service. Proof of Concept (PoC): ======================= The persistent input validation web vulnerability can be exploited by remote attackers with low privileged application user account with low or medium user interaction. For security demonstration or to reproduce the security vulnerability follow the provided information and steps below to continue. Manual steps to reproduce the security vulnerability ... 1. Open the website of magento.com and surf to the fundamentals-of-magento-development site URL: http://magento.com/training/catalog/fundamentals-of-magento-development-5-day?mkt_tok=3RkMMJWWfF9wsRojuqvMcu %2FhmjTEU5z16usuW6Syi5Z41El3fuXBP2XqjvpVQcdkN7rKRw8FHZNpywVWM8TIL9kXt9BlJAzqD2w%3D#.VKvFansvnZx 2. Click the register button that redirects to the following location URL:http://magento.com/training/catalog/checkout/cart/ 3. Click the checkout button without included credentials or non expired session URL: https://magento.com/training/catalog/checkout/onepage/ 4. Inject payload in the name values and save it. Then proceed to include your paypal test payment information to continue. Note: