This document discusses XSS vulnerabilities in Grails applications and provides countermeasures. It explains XSS concepts and threats. It details several XSS issues that existed in Grails prior to version 2.3, such as the default codec being none, inconsistent encoding behavior, tags not escaping output, and the message tag not escaping arguments. It outlines encoding enhancements in Grails 2.3, including more secure defaults, finer-grained control of codecs, and context-sensitive encoding switching. The document stresses reviewing plugins for security issues and thinking like an attacker to find vulnerabilities. It recommends always escaping dynamic values, using fuzzing tools, and following OWASP best practices.