Given all the forum hacks that have been going on in the past two or three years, I'm beginning to think that pre-built forum scripts like vBulletin, Invision, phpBB, SMF, etc aren't worth the time saved by using them. They've all become overly complex and full of holes.
If you've written your own forum script, you're not going to suffer the same exploits as everyone else. Any would-be attackers would have to spend a lot of time figuring out the holes in your system, which just isn't worth it when they can just get ahold of the code for a widely used script like vBulletin and use any holes they find in it against a wide variety of sites.
Of course there's no patch for stupidity and every site can be subject to socially-engineered exploits, but that can be prevented at some level through good judgement when picking moderators and administrators.