← Java / Spring · Contents

JAVA-019 / Beginner

Unescaped JSP output using <%= %>

A03:2021 Injection · CWE-79 XSS

Why is this a problem?

Stored or reflected scripts are executed.

How to fix it

jsp
<p><c:out value="${param.q}"/></p>

Further reading