We analyze the software stack of popular mobile advertising libraries and investigate how they protect the users of advertising-supported apps from malicious advertising. We find that, by and large, advertising libraries properly separate the privileges of the ads from the host app and confine untrusted ads in dedicated browser instances that correctly apply the same origin policy. We then demonstrate how confined malicious ads can still use their ability to load content from external storage (essential for media-rich ads in order to cache video and images) to infer sensitive personal information about the user of the device - even when they cannot read the loaded objects due to the same origin policy. We present our recommendations for mitigating the privacy risks of malicious ads and explain how to re-design mobile advertising software to better protect users from malicious advertising.