Apache Wicket: XSS in AutoLabelTextResolver via FormComponent.setLabel
Apache Software Foundation Apache Wicket
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Apache Software Foundation Apache Wicket |
| No fix yet |
Original description
Improper neutralization of input during web page generation in Apache Wicket.
The <wicket:label> tag is provided by org.apache.wicket.markup.html.form.AutoLabelTextResolver, which is registered by default in every WebApplication. The resolver writes the label it finds into the markup as it is, and reads no escaping setting at all, so markup in a label is rendered as markup.
When the label comes from the labelled component's label model, set through FormComponent#setLabel(IModel), it is written to the markup unescaped. An application is affected where the label of a form component holds data an attacker can influence. Wicket cannot determine where a model value comes from, so whether it reaches the page from a request or from storage is a property of the application.