---
id: "CVE-2026-84231"
kind: "vulnerability"
aliases: ["CVE-2026-84231"]
title: "Apache Wicket: ExternalLink on non-anchor tags runs attacker script on click"
severity: "high"
cvss: 7.4
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["apache-wicket", "java", "package", "web-apps"]
not_affected_if: ["anchor-only-links", "no-external-link", "wicket-8.20.0-or-later"]
published_at: "2026-11-01T23:17:30+00:00"
first_seen_at: "2026-11-01T23:22:40+00:00"
updated_at: "2026-11-01T23:23:27+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-84231", "first_seen_at": "2026-11-01T23:22:40+00:00"}]
---

# Apache Wicket: ExternalLink on non-anchor tags runs attacker script on click

ExternalLink writes its URL into a single-quoted JavaScript string in an onclick attribute when bound to a non-anchor tag such as a button or span, and only HTML-escapes the value. The browser decodes the escaped apostrophe, so an attacker-influenced URL breaks out of the string and runs script in the application's origin once a user clicks the element.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Search templates and Java code for `ExternalLink` bound to tags other than `a`, `link` or `area`, such as `<button wicket:id=...>` or `<span wicket:id=...>`.
- Check the Wicket version in the build file: `org.apache.wicket:wicket-core` between `8.0.0` and `8.19.0`, or any `7.x` release.

## Fix

- Apache Wicket: upgrade to `8.20.0`.
- Apache Wicket 7.x and older: no supported fix; move to a supported version.

## Timeline

- 2026-11-01T23:22:40+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-84231

## From the sources

Improper neutralization of input during web page generation in Apache Wicket.

org.apache.wicket.markup.html.link.ExternalLink builds a JavaScript click handler and writes it into the tag's onclick attribute whenever the markup tag the component is bound to is not an a, link or area element. The URL held in the component's model is concatenated into a single-quoted JavaScript string literal in that handler without being escaped for that context. The same happens on the neighbouring branch, taken when popup settings are attached, where the value is concatenated into the window.open() call built by org.apache.wicket.markup.html.link.PopupSettings#getPopupJavaScript(). The only escaping applied is the markup escaping that every attribute value receives as the tag is written, which replaces an apostrophe with a character reference. A browser decodes character references in an attribute value before it compiles the event handler, so the apostrophe is restored, closes the string literal, and the rest of the model value is executed as script in the application's origin.

An application is affected where it binds an ExternalLink to a markup tag that is not an anchor, such as a button or a span, and the URL in the model holds data an attacker can influence, which is the ordinary use of the component rather than a misuse of it. Nothing runs until a user activates the element.

This issue affects Apache Wicket: from 8.0.0 through 8.19.0. Users of Apache Wicket 7.x or older, which are no longer supported, should upgrade to a supported version.

Users are recommended to upgrade to version 8.20.0, which fixes the issue.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
