URL injections occur when attackers create new pages on existing websites. These new pages are injected with codes that redirect users to sites or facilitate an attack on other sites. Generally, the injections are conducted through software vulnerabilities, plug-ins or unsecured directories. To prevent this form of attack, identification of the new pages is necessary. After the injected code is detected, site administrators remove the functions used by hackers to create the new pages and restore infected directories with versions saved on restore points. URL injections target sites with security vulnerabilities, so the best way to prevent future occurrences is to address existing security gaps.