Codeigniter and other popular frameworks like Zend, cake, Yii etc. they all provide methods and structure which to a certain extent force the developer to write code that is resistant to common exploits such as cross site scripting XSS, and SQL injection and other hacks. but everything really depends on the developer. frameworks will only provide a well tested structure to build ur applications. you can in some cases make much more secure code if you write core php. But that requires a very skilled developer. so in most cases using a framework will definitely give u an advantage.
solved Security in codeigniter