SQL injection is the attack made between a query in Codeigniter. It prevents by providing built in libraries and functions.