MercadoPago Android App Information Disclosure

1. Advisory Information

Title: MercadoPago Android App Information Disclosure
Advisory ID: CORE-2014-0011
Advisory URL: http://www.coresecurity.com/advisories/mercadopago-android-app-information-disclosure
Date published: 2014-12-19
Date of last update: 2014-12-17
Vendors contacted: Mercadolibre
Release mode: Coordinated release

2. Vulnerability Information

Class: Information Exposure [CWE-200]
Impact:
Remotely Exploitable: No
Locally Exploitable: Yes
CVE Name: CVE-2014-0996

3. Vulnerability Description

With the MercadoPago application [1] you can complete the purchases you start from your computer directly from your cellphone in an easy way, under the same security standards that MercadoPagos's platform [2] offers and with the possibility to configure a security PIN.

The application logs sensitive user information using it. This includes user name, password, and access token obtained after authentication.

4. Vulnerable Packages

  • MercadoPago 1.2.5

Other versions could be also affected but were not tested.

5. Vendor Information, Solutions and Workarounds

MercadoLibre has updated their MercadoPago Android APP [1], so it's recommended that all the affected users update the app.

6. Credits

This vulnerability was discovered and researched by Nicolas Araujo from the Core Engineering Team. The publication of this advisory was coordinated by Joaquin Rodriguez Varela from Core Advisories Team.

7. Technical Description / Proof of Concept Code

This vulnerability can be exploited by third party applications that have permission to "READ_LOGS". Leveraging reading logs (achieved through the "logcat" command) third-party applications have access to sensitive information of users using the application of MercadoPago.

The application makes an abuse of "Log.i (...)" method allowing an information leak in HTTPS requests and response. You can see,in plain text, the log of HTTPS requests with the corresponding JSON message. This means, among other things, that the login username and password can be seen without problems.

Limitations:

Permits of "READ_LOGS" are no longer available for third-party applications since Android version 4.1. However, this still works for previous Android versions or for rooted devices.

Sample requests with visible sensitive information::

12-02 14:43:15.370: I/MercadoPago Wallet(1762): makePostRequest(path: https://api.mercadolibre.com/mpmobile/oauth/token body: {"token":{"username":"pepe_prueba@veoveo.com","client_secret":"wVOxSvl2a2D4Y5QLqAMgHV9x7PvI5oEl","client_id":"1311377052931992","grant_type":"password","password":"ContraseniaReSecreta"},"fingerprint":{"free_disk_space":154,"os":"android","vendor_ids":[{"value":"93e14342d9bd8e76","name":"android_id"},{"value":"28f2e34227c13a26","name":"fsuuid"}],"model":"sdk","ram":513800,"disk_space":197,"vendor_specific_attributes":{"platform":"armeabi-v7a","feature_nfc":false,"feature_flash":false,"feature_bluetooth":true,"feature_accelerometer":true,"feature_camera":true,"product":"sdk","feature_microphone":true,"feature_front_camera":false,"feature_touch_screen":true,"manufacturer":"unknown","device":"generic","brand":"generic","screen_density":0.75,"feature_gyroscope":false,"feature_compass":true,"feature_telephony":false,"feature_gps":false},"resolution":"240x284","system_version":"4.4.2"}} headers:null

12-02 14:43:19.320: I/MercadoPago Wallet(1762): makeGetRequest(path: https://api.mercadolibre.com/mpmobile/users/me?access_token=APP_USR-1311579282931992-120114-54cc5c70a19e555b923c70919a2e7210__I_N__-172332419          

Here is the code that makes the application leak this information:

         Class:
    # com.mercadopago.core.RestApi
    
         Methods:
         
    >> executePostRequest(String paramString, JSONObject paramJSONObject, Map<String, String> paramMap)
        Log.i("MercadoPago Wallet", "makePostRequest(path: " + paramString + " body: " + String.valueOf(paramJSONObject) + " headers:" + String.valueOf(paramMap));
        ...
    
    >> makeDeleteRequest(String paramString, Map<String, String> paramMap)
        Log.i("MercadoPago Wallet", "makePostRequest(path: " + paramString + " headers:" + String.valueOf(paramMap));
        ...
    
    >> makeGetRequest(String paramString)
        Log.i("MercadoPago Wallet", "makeGetRequest(path: " + paramString);
        ...           

8. Report Timeline

  • 2014-12-11: Core Security contacts Mercadolibre to inform them that a vulnerability has been found in their MercadoPago application for Android.
  • 2014-12-11: Mercadolibre sends their public PGP keys and request the technical information.
  • 2014-12-12: Core Security sends a draft advisory with technical details.
  • 2014-12-15: Mercadolibre informs they have corrected the problem and are about to release the new version of the MercadoPago APP to the PlayStore today. They request to delay the publication in order to give time to their users to update the APP.
  • 2014-12-15: Core Security schedules the release of the advisory for the 19th of December, 2014.
  • 2014-12-19: Advisory CORE-2014-0011 published.

9. References

[1] .https://play.google.com/store/apps/details?id=com.mercadopago.wallet
[2] .http://www.mercadopago.com

10. About CoreLabs

CoreLabs, the research center of Core Security, is charged with anticipating the future needs and requirements for information security technologies. We conduct our research in several important areas of computer security including system vulnerabilities, cyber attack planning and simulation, source code auditing, and cryptography. Our results include problem formalization, identification of vulnerabilities, novel solutions and prototypes for new technologies. CoreLabs regularly publishes security advisories, technical papers, project information and shared software tools for public use at: http://corelabs.coresecurity.com.

11. About Core Security Technologies

Core Security Technologies enables organizations to get ahead of threats with security test and measurement solutions that continuously identify and demonstrate real-world exposures to their most critical assets. Our customers can gain real visibility into their security standing, real validation of their security controls, and real metrics to more effectively secure their organizations.

Core Security's software solutions build on over a decade of trusted research and leading-edge threat expertise from the company's Security Consulting Services, CoreLabs and Engineering groups. Core Security Technologies can be reached at +1 (617) 399-6980 or on the Web at: http://www.coresecurity.com.

12. Disclaimer

The contents of this advisory are copyright (c) 2014 Core Security and (c) 2014 CoreLabs, and are licensed under a Creative Commons Attribution Non-Commercial Share-Alike 3.0 (United States) License: http://creativecommons.org/licenses/by-nc-sa/3.0/us/

13. PGP/GPG Keys

This advisory has been signed with the GPG key of Core Security advisories team, which is available for download at http://www.coresecurity.com/files/attachments/core_security_advisories.asc.