Cascade Introduced XSS Vulnerability in Templates
Cross-site scripting (XSS) vulnerability introduced in Cascade-generated templates. User input is rendered without HTML escaping, allowing attackers to inject malicious JavaScript that runs in other users' browsers.
This is a critical security issue requiring immediate fix.
Error Messages You Might See
Common Causes
- Cascade used th:utext='${variable}' instead of th:text for unescaped output
- User comment or name rendered directly without sanitization
- Cascade removed HTML escaping in frontend template or disabled it
How to Fix It
Use th:text='${variable}' instead of th:utext to enable HTML escaping. Sanitize user input server-side if HTML is needed. Use security libraries like OWASP ESAPI or DOMPurify for sanitization. Never render user input directly without escaping. Review all template variables for proper escaping.
Real developers can help you.
You don't need to be technical. Just describe what's wrong and a verified developer will handle the rest.
Get HelpFrequently Asked Questions
How do I prevent XSS in templates?
Always escape user input. Thymeleaf: use th:text not th:utext. Never render user data as HTML.
When should I use utext?
Only if you control the HTML content (static content from database). Never with user-provided input.