HTC recently acknowledged a security flaw in its handsets that allowed malicious apps to steal Wi-Fi passwords. This type of flaw could potentially allow for targeted exploitation of a company or residential network. Luckily, HTC and Google were very responsive and a fix has already been developed and deployed. It was actually discovered in September 2011, but was kept a secret publicly until Google and HTC had time to address it and provide the appropriate fixes.
According to the U.S. Computer Emergency Readiness Team (US-CERT), the devices affected by the security flaw include the Desire HD, Glacier, Droid Incredible, Thunderbolt 4G, Sensation Z710e, Sensation 4G, Desire S, EVO 3D and EVO 4G.
This is a prime example of why Apple has such a strict acceptance policy of the apps that are allowed in the iTunes App Store. They monitor the code and test the apps before releasing them to the public to avoid problems. That said, there have been apps that mistakingly made their way into the store.