Specification has its place, but even with "perfect" pieces of software, the interaction of them, together with their interaction with the physical hardware, mean that you still can't know everything that can happen in the whole system. You can specify a unix tool (do one thing and do it well...), but you can't formally prove all of an operating system plus userland without very strictly limiting what outcomes are possible, and even then novel or buggy hardware or other physical environment variables could produce unexpected results: bugs. The formal specifications themselves, to cover all this, will have to become so complex that no human can understand them, which just means that some potential exploits will be explicitly allowed by the spec, and an evaluator at a given level of intelligence (human or other) may not understand the bug or even that it exists.
For any system designed by some intelligent agent IA, there's going to be holes/bugs/exploits that can be easily seen by some agent IA*100. This has never been a serious problem in anything before, because humans don't span that range of intelligence, and collaboration doesn't provide such insights.