HeaderInjection
HeaderInjection is a class of vulnerabilities in which untrusted input is incorporated into HTTP response headers or, in email workflows, into mail headers, enabling an attacker to influence header content. In web applications, this often occurs when header names or values are built by concatenating strings with user-supplied data, such as redirect locations (Location) or cookies (Set-Cookie).
The common mechanism is the presence of carriage return and line feed characters in the input. CR
Impact can include cache poisoning, unintended page redirects, and the potential for cross-site scripting if header
Mitigation focuses on preventing untrusted data from influencing header construction. Best practices include using framework APIs