Injection Attacks: Without the Content-Type
header specifying text/html
or application/json
, browsers or applications can incorrectly interpret response data and Cross-Site Scripting (XSS) can occur. This ambiguity can be exploited by attackers to inject malicious scripts, which execute within the context of other users' sessions, leading to unauthorized actions or data theft.