Header injection and URL redirection are possible when a web application accepts unvalidated user inputs. This untrusted data may redirect the page to a malicious web site.
Introducing Header Injection and URL Redirection
Consider some simple PHP code:
The preceding PHP file, once clicked, takes us to the https://sanjib.site.
Now, consider a case when a developer writes the same code this way: