Android dominates the smartphone market but that dominance comes at a cost. According to CVE details, Android had the most vulnerabilities of any operating system in 2016. In this case, vulnerabilities are defined as a mistake in the software that can be directly used by a hacker to gain access to a system or network. Android had 523 such vulnerabilities in 2016, far ahead of 161 for iOS. 2015 was a completely different story. Back then, Android had only 125 vulnerabilities while iOS had 387.
This chart shows the number of vulnerabilities by operating system in 2016.