What is header injection and how it post a security issue in php? Seems that there's not much online tutorial on header injection. ..
what header injection do you mean, email headers ? if so see http://forums.digitalpoint.com/showthread.php?t=954171
Off the top of my head, I think what you're talking about is when the user is allowed(or the user finds a way) to inject information into the HTTP headers. For example, a link like : http://myinsecuresite.com/redirect.php?destination=http://yahoo.com . If you do this in your code: header("Location: $_GET[destination]"); then you are allowing injection. There are probably other more potentially destructive examples. I'm not an expert on the subject, but there is an old programming rule: never trust user input. If you abide by that rule you can probably avoid a lot of different injection attacks.
This sort of attack allows for crafting HTTP requests into web applications and can manipulate how they are processed and used to interact with users and the server. Additionally, disable all of the HTTP methods you do not need, and finally if the HTTP methods "PUT", "OPTIONS", and "DELETE" are open, this will increase the risk of being vulnerable to HTTP Header injection. If possible, always use the "POST" variable. It eliminates most of the attacks available under the "GET" variable.