Magento 1.9.x Multiple Man-In The Middle

Risk: Medium
Local: No
Remote: Yes
CWE: CWE-295

Magento 1.9.x Multiple Man-In The Middle --- Description --- The man-in-the middle attack intercepts a communication between two systems. For example, in an http transaction the target is the TCP connection between client and server. Using different techniques, the attacker splits the original TCP connection into 2 new connections, one between the client and the attacker and the other between the attacker and the server, as shown in figure 1. Once the TCP connection is intercepted, the attacker acts as a proxy, being able to read, insert and modify the data in the intercepted communication. --- Result of static code analysis --- Let's follow the curl's settings for CURLOPT_SSL_VERIFYPEER and CURLOPT_SSL_VERIFYHOST in Magento 1.9. CURLOPT_SSL_VERIFYPEER option. WARNING: disabling verification of the certificate allows bad guys to man-in-the-middle the communication without you knowing it. Disabling verification makes the communication insecure. Just having encryption on a transfer is not enough as you cannot be sure that you are communicating with the correct end-point. CURLOPT_SSL_VERIFYHOST option. When the verify value is 0, the connection succeeds regardless of the names in the certificate. Use that ability with caution! DHL App --------------------------------- ./magento-mirror- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); ./magento-mirror- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); ./magento-mirror- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); ./magento-mirror- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); --------------------------------- In this file, we can see ---- protected function _doRequest() { $r = $this->_rawRequest; $xml = new SimpleXMLElement('<?xml version = "1.0" encoding = "UTF-8"?><eCommerce/>'); $xml->addAttribute('action', 'Request'); $xml->addAttribute('version', '1.1'); $requestor = $xml->addChild('Requestor'); $requestor->addChild('ID', $r->getId()); $requestor->addChild('Password', $r->getPassword()); ---- where ID and Password are sending in insecure connection. Next. Fedex App --------------------------------- ./magento-mirror- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); ./magento-mirror- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); --------------------------------- The same problem. Vulnerable. UPS App --------------------------------- ./magento-mirror- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, (boolean)$this->getConfigFlag('mode_xml')); ./magento-mirror- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, (boolean)$this->getConfigFlag('mode_xml')); ./magento-mirror- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, (boolean)$this->getConfigFlag('mode_xml')); --------------------------------- Missing CURLOPT_SSL_VERIFYHOST. Vulnerable. Mobile Controller --------------------------------- ./magento-mirror- curl_setopt($curlHandler, CURLOPT_SSL_VERIFYHOST, 2); ./magento-mirror- curl_setopt($curlHandler, CURLOPT_SSL_VERIFYPEER, 0); --------------------------------- CURLOPT_SSL_VERIFYPEER == 0. Vulnerable Mobile Controller --------------------------------- ./magento-mirror- $this->curlOption(CURLOPT_SSL_VERIFYPEER, false); ./magento-mirror- $this->curlOption(CURLOPT_SSL_VERIFYHOST, 2); --------------------------------- CURLOPT_SSL_VERIFYPEER == false. Vulnerable 3D Secure CentinelClient --------------------------------- ./magento-mirror- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); ./magento-mirror- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); --------------------------------- CURLOPT_SSL_VERIFYPEER == false. Vulnerable PEAR SOAP -------------------------------- ./magento-mirror- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); --------------------------------- Vulnerable Errors caught by Sorry for the late publication but Magento Security Team did not responded to my emails :( In ChangeLog for version * Fixed a security issue when CURLOPT_SSL_VERIFYPEER and CURLOPT_SSL_VERIFYHOST where used with improper values sometimes and for * Fixed security issue - set `CURLOPT_SSL_VERIFYPEER` to `true` by default in cUrl calls but no detailed information available --- Credit --- Maksymilian Arciemowicz from CXSECURITY


Vote for this issue:


Thanks for you vote!


Thanks for you comment!
Your message is in quarantine 48 hours.

Comment it here.

(*) - required fields.  
{{ x.nick }} | Date: {{ x.ux * 1000 | date:'yyyy-MM-dd' }} {{ x.ux * 1000 | date:'HH:mm' }} CET+1
{{ x.comment }}

Copyright 2024,


Back to Top