In this day and age, having security problems with software is inevitable. So many people are trying to hack your shit from crazy Russians to the NSA.
WordPress for example has a very bad reputation for security and I would tend to agree. The latest version with no plugins is probably safe. However that isn’t the version most people are running and most people do use plugins.