Security issues and WP themes?

I’m going to use a WP theme (no previous experience), but I’ve read about some security issues with them regarding sites getting hacked. What do I need to consider when choosing a theme?