The security of the site is one of the main concerns when developing sites or applications with WordPress. Open source code and the old coding techniques to keep the backward compatibility are two reasons for these security concerns. However, the major threat comes with the use of third-party plugins and themes, as there is no guarantee about the quality of them in many cases. So, it's essential to secure WordPress sites as much as possible to prevent attacks through plugins, themes, or known security concerns.
The WordPress codex provides a separate section called Hardening WordPress for defining the necessary security constraints. You can read this security guide at http://codex.wordpress.org/Hardening_WordPress ...