Chapter

Computer Security – ESORICS 2011

Volume 6879 of the series Lecture Notes in Computer Science pp 150-171

A Systematic Analysis of XSS Sanitization in Web Application Frameworks

  • Joel WeinbergerAffiliated withLancaster UniversityUniversity of California
  • , Prateek SaxenaAffiliated withLancaster UniversityUniversity of California
  • , Devdatta AkhaweAffiliated withLancaster UniversityUniversity of California
  • , Matthew FinifterAffiliated withLancaster UniversityUniversity of California
  • , Richard ShinAffiliated withLancaster UniversityUniversity of California
  • , Dawn SongAffiliated withLancaster UniversityUniversity of California

* Final gross prices may vary according to local VAT.

Get Access

Abstract

While most research on XSS defense has focused on techniques for securing existing applications and re-architecting browser mechanisms, sanitization remains the industry-standard defense mechanism. By streamlining and automating XSS sanitization, web application frameworks stand in a good position to stop XSS but have received little research attention. In order to drive research on web frameworks, we systematically study the security of the XSS sanitization abstractions frameworks provide. We develop a novel model of the web browser and characterize the challenges of XSS sanitization. Based on the model, we systematically evaluate the XSS abstractions in 14 major commercially-used web frameworks. We find that frameworks often do not address critical parts of the XSS conundrum. We perform an empirical analysis of 8 large web applications to extract the requirements of sanitization primitives from the perspective of real-world applications. Our study shows that there is a wide gap between the abstractions provided by frameworks and the requirements of applications.