answers, "why you should write your own framework, if you have the knowledge and time."
Running anything on the web has risks, some more than others. Likewise, there are tradeoffs to any given plan.
Wordpress itself isn't some terrible thing, but an outdated version with 100+ plugins that is poorly administered is likely to be an unauthenticated root shell that happens to also function as a website. This is true of any web framework though.