Injection attack is a type of attack allowing attackers to inject unwanted code into an application. There are several types of attacks, based on the application, with the most common ones being SQL injection and cross-site scripting.