In Apache Wicket, the Button component's security behavior depends on which HTML element you attach it to in your template — a design flaw that creates uneven security burdens without warning. When you use Button with an <input> element, the framework clears the escape-model-strings flag by default. This prevents double encoding, since ComponentTag already encodes attribute values. That's a reasonable optimization for <input value="..."> contexts. But the same Button class works with <button> elements where the model value renders into the element body — and nobody encodes body content by default. The framework's security behavior thus silently changes based on your markup choice, not on anything you explicitly control.

This creates a two-tier security model: developers using <button> must actively know to re-enable escaping, while developers using <input> must actively know to disable it to avoid double encoding. Discovering this requires understanding ComponentTag's internal encoding behavior, the distinction between attribute and body rendering, and that Button deliberately flips a security default for optimization reasons.

What to check: Review your Wicket templates for any <button> elements using Button components with dynamic model data. If the model value comes from user input, ensure your Button code calls setEscapeModelStrings(true). For <input type="submit"> or similar, verify whether double encoding is a concern in your specific case. The workaround is simple — but the knowledge required to know you need it is not reasonable for a security-sensitive operation.

The deeper issue spans Wicket 6.x through 10.x without a safe default. This isn't just a bug — it's a framework architectural decision that prioritizes an attribute-encoding optimization over consistent security behavior. The CVSS 5.1 score reflects the uncertainty around practical exploitability, but the real risk is structural: any application that upgraded through multiple major versions without auditing button markup carries invisible exposure in their form layer. The vulnerability persists not because it's being actively exploited, but because it's invisible — developers assume their "working" buttons are secure.