conclusion
Observing the general picture, some similarities between seemingly different attack types can be noted. For example, XSS attacks are in their core very similar to SQL injection attacks. Both are possible because of context mismatches. In case of SQL injections, user-supplied data is wrongly put in SQL command context by for example escaping the string context or command boundary; for XSS attacks, the user input escapes HTML tags intended by the author. The root of the problem lies in the lack of separation of data and (sometimes multiple) code streams. The misinterpretation of data context can also be explained by the perception difference between the developer and a web browser.