Security

Explain HTTP Header Injection vulnerability

Difficulty: unrated

Source: bregman-arie/devops-exercises by Arie Bregman

Answer

HTTP Header Injection vulnerabilities occur when user input is insecurely included within server responses headers. If an attacker can inject newline characters into the header, then they can inject new HTTP headers and also, by injecting an empty line, break out of the headers into the message body and write arbitrary content into the application's response.