Mobile devices are very popular today and also the mobile applications market. The mobile operating market is shared among Android and iOS. Mobile applications are built natively for these operating systems or are Web-based. No matter the platform, there are user data managed by the mobile applications and transferred on external servers. These data are exposed to attacks and the developers should be always concerned about the security issues related to their systems. In this paper we analyze the vulnerabilities related to mobile applications and we propose several countermeasures, in order to eliminate or to mitigate the security risks.