CVE-2026-76986 is an XSS vulnerability in Apache Wicket's AbstractSingleSelectChoice component. The root cause is not a single developer mistake but a systemic architectural inconsistency: the framework escapes output in nearly all rendering paths but deliberately leaves escaping responsibility to developers who override getNullValidDisplayValue() and getNullKeyDisplayValue(). This creates an implicit contract that is invisible in the API — the methods return String with no compile-time or naming signal that they require different treatment than strings returned from other overridden methods. Developers who correctly escape everywhere else logically assume the framework handles their return value safely. The cognitive trap is that security becomes context-dependent: escape in this specific override, but not in those other ones. That kind of conditional rule is precisely where real-world vulnerabilities emerge.

The patched version adds escaping to these methods, which closes this specific vector. However, the underlying architectural problem persists. The fix amputates the vulnerability at one joint without addressing the pattern: other Wicket components likely have similar inconsistent escaping behaviors between different output paths, particularly in null/default/placeholder states. The RadioChoice component avoids this entirely by simply not emitting a default option — elimination over inconsistent handling.

For defenders, three actions matter. First, verify your Wicket version is patched; the fix adds escaping in the null-display value return path. Second, audit your codebase for any getNull*DisplayValue overrides and ensure they either return already-escaped content or the patch handles it — but do not assume the patch covers all similar methods. Third, treat this as a leading indicator: audit other components for null/default rendering paths where escaping may have been overlooked. The next vulnerability in Wicket will probably live in the same category of invisible safety contracts, not in the hot paths that have received security attention. The framework should enforce escaping at the point of output unconditionally, or provide a distinct SafeString type that propagates safety guarantees through the type system — what it should not do is continue teaching developers that some override methods require manual escaping while others don't.