This document is a master's thesis that examines DOM-based cross-site scripting (DOMXSS) attacks. It provides background on DOMXSS, including classifications of sources and sinks. It presents case studies of DOMXSS attacks on real websites. It also discusses prevention and defense against DOMXSS, such as function flow analysis, proper use of filters, and related penetration testing tools. The goal of the thesis is to propose categorizations and a meta-model of DOMXSS, demonstrate case studies, and suggest best practices to address this web application security issue.