skip to main content
10.1145/1772690.1772701acmotherconferencesArticle/Chapter ViewAbstractPublication PageswwwConference Proceedingsconference-collections
research-article

Regular expressions considered harmful in client-side XSS filters

Published:26 April 2010Publication History

ABSTRACT

Cross-site scripting flaws have now surpassed buffer overflows as the world's most common publicly-reported security vulnerability. In recent years, browser vendors and researchers have tried to develop client-side filters to mitigate these attacks. We analyze the best existing filters and find them to be either unacceptably slow or easily circumvented. Worse, some of these filters could introduce vulnerabilities into sites that were previously bug-free. We propose a new filter design that achieves both high performance and high precision by blocking scripts after HTML parsing but before execution. Compared to previous approaches, our approach is faster, protects against more vulnerabilities, and is harder for attackers to abuse. We have contributed an implementation of our filter design to the WebKit open source rendering engine, and the filter is now enabled by default in the Google Chrome browser.

References

  1. Tim Berners-Lee and Dan Connolly. Hypertext Markup Language - 2.0. IETF RFC 1866, November 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Steve Christey and Robert A. Martin. Vulnerability type distributions in cve, 2007. http://cwe.mitre.org/documents/vuln-trends/.Google ScholarGoogle Scholar
  3. Douglas Crockford. ADsafe.Google ScholarGoogle Scholar
  4. Facebook. Fbjs. http: //wiki.developers.facebook.com/index.php/FBJS.Google ScholarGoogle Scholar
  5. David Flanagan. JavaScript: The Definitive Guide, chapter 20.4 The Data-Tainting Security Model. O'Reilly & Associates, Inc., second edition, January 1997.Google ScholarGoogle Scholar
  6. Google. Caja: A source-to-source translator for securing JavaScript-based web content. http://code.google.com/p/google-caja/.Google ScholarGoogle Scholar
  7. Google. V8 benchmark suite. http://v8.googlecode. com/svn/data/benchmarks/v5/run.html.Google ScholarGoogle Scholar
  8. Robert Hansen. XSS (cross site scripting) cheat sheet. http://ha.ckers.org/xss.html.Google ScholarGoogle Scholar
  9. Apple Inc. Sunspider. http://www2.webkit.org/perf/sunspider-0.9/sunspider.html.Google ScholarGoogle Scholar
  10. Inferno. Exploiting IE8 UTF-7 XSS vulnerability using local redirection, May 2009. http://securethoughts.com/2009/05/ exploiting-ie8-utf-7-xss-vulnerability-using-local-redirection/.Google ScholarGoogle Scholar
  11. Engin Kirda, Christopher Kruegel, Giovanni Vigna, and Nenad Jovanovic. Noxes: A client-side solution for mitigating cross site scripting attacks. In Proceedings of the 21st ACM Symposium on Applied Computing (SAC), 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Eric Lawrence. IE8 security part VII: Clickjacking defenses. http://blogs.msdn.com/ie/archive/2009/01/27/ ie8-security-part-vii-clickjacking-defenses. aspx.Google ScholarGoogle Scholar
  13. David Lindsay et al. Chrome gets XSS filters, September 2009. http://sla.ckers.org/forum/read.php?13,31377.Google ScholarGoogle Scholar
  14. Giorgio Maone. NoScript. http://www.noscript.net.Google ScholarGoogle Scholar
  15. Larry Masinter. The "data" URL scheme. IETF RFC 2397, August 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Microsoft. About dynamic properties. http://msdn.microsoft.com/en-us/library/ms537634(VS.85).aspx.Google ScholarGoogle Scholar
  17. Mitre. CVE-2009-4074.Google ScholarGoogle Scholar
  18. Eduardo Vela Nava and David Lindsay. Our favorite XSS filters/IDS and how to attack them, 2009. Black Hat USA presentation.Google ScholarGoogle Scholar
  19. Jeremias Reith. Internals of noXSS, October 2008. http://www.noxss.org/wiki/Internals.Google ScholarGoogle Scholar
  20. David Ross. IE 8 XSS filter architecture/implementation, August 2008. http: //blogs.technet.com/srd/archive/2008/08/18/ ie-8-xss-filter-architecture-implementation. aspx.Google ScholarGoogle Scholar
  21. Steve. Preventing frame busting and click jacking, Februrary 2009. http://coderrr.wordpress.com/2009/02/13/ preventing-frame-busting-and-click-jacking-ui-redressing/.Google ScholarGoogle Scholar
  22. Andrew van der Stock, Jeff Williams, and Dave Wichers. OWASP top 10, 2007. http://www.owasp.org/index.php/Top_10_2007.Google ScholarGoogle Scholar
  23. Philipp Vogt, Florian Nentwich, Nenad Jovanovic, Engin Kirda, Christopher Kruegel, and Giovanni Vigna. Cross site scripting prevention with dynamic data tainting and static analysis. In Proceedings of the Network and Distributed System Security Symposium (NDSS), 2007.Google ScholarGoogle Scholar
  24. Michal Zalewski. Browser Security Handbook, volume 2.Google ScholarGoogle Scholar
  25. http://code.google.com/p/browsersec/wiki/ Part2#Arbitrary_page_mashups_(UI_redressing).Google ScholarGoogle Scholar

Index Terms

  1. Regular expressions considered harmful in client-side XSS filters

              Recommendations

              Comments

              Login options

              Check if you have access through your login credentials or your institution to get full access on this article.

              Sign in
              • Published in

                cover image ACM Other conferences
                WWW '10: Proceedings of the 19th international conference on World wide web
                April 2010
                1407 pages
                ISBN:9781605587998
                DOI:10.1145/1772690

                Copyright © 2010 International World Wide Web Conference Committee (IW3C2)

                Publisher

                Association for Computing Machinery

                New York, NY, United States

                Publication History

                • Published: 26 April 2010

                Permissions

                Request permissions about this article.

                Request Permissions

                Check for updates

                Qualifiers

                • research-article

                Acceptance Rates

                Overall Acceptance Rate1,899of8,196submissions,23%

              PDF Format

              View or Download as a PDF file.

              PDF

              eReader

              View online with eReader.

              eReader

              ePub

              View this article in ePub.

              View ePub