I hate PHP as a language, I really do, but bugs can happen in any language (eg C++ bugs are exploited all the time to gain machine access). Plus when you get a platform as popular as Wordpress, you'll find that it will constantly be under attack from 'hackers' who bank on people being slow to update their plugins.
With regards to ownCloud, that is PHP by the way.