---
id: "CVE-2026-120421"
kind: "vulnerability"
aliases: ["CVE-2026-120421"]
title: "Eclipse Mojarra: unencoded client window id enables reflected cross-site scripting"
severity: "medium"
cvss: 6.1
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["jakarta-faces", "java", "jsf", "mojarra", "package"]
not_affected_if: ["default-config", "outside-affected-versions"]
published_at: "2026-11-04T15:17:41+00:00"
first_seen_at: "2026-11-04T15:27:29+00:00"
updated_at: "2026-11-04T15:28:26+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-120421", "first_seen_at": "2026-11-04T15:27:29+00:00"}]
---

# Eclipse Mojarra: unencoded client window id enables reflected cross-site scripting

When URL client window mode is enabled, Eclipse Mojarra appends the jfwid or jakarta.faces.ClientWindow request parameter to generated URLs without encoding it, and h:button renders that value into a JavaScript string. An attacker can lure a user to a crafted link that runs script in the victim's browser, and with CSP nonces enabled the script can bypass the Content Security Policy.

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

## How to check

- Check whether `jakarta.faces.CLIENT_WINDOW_MODE` is set to `url` in `web.xml` or the application configuration
- Check whether `com.sun.faces.enableCspNonce` is set to `true`
- Check the Mojarra version in the project dependencies against the affected ranges (2.2.0 through 4.0.28, 4.1.0 through 4.1.19, 5.0.0-M1 through 5.0.0-M11)

## Fix

- Upgrade Mojarra to a release newer than the affected ranges (2.2.0 to 4.0.28, 4.1.0 to 4.1.19, 5.0.0-M1 to 5.0.0-M11); the fixed version numbers are unknown from the sources

## Timeline

- 2026-11-04T15:27:29+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-120421

## From the sources

In Eclipse Mojarra versions 2.2.0 through 4.0.28, 4.1.0 through 4.1.19, and 5.0.0-M1 through 5.0.0-M11, when URL client window mode is enabled (`jakarta.faces.CLIENT_WINDOW_MODE=url`), the client window id from the `jfwid` or `jakarta.faces.ClientWindow` request parameter is appended to generated URLs without URL-encoding. `h:button` renders such a URL into a JavaScript string literal, which allows reflected cross-site scripting. With `com.sun.faces.enableCspNonce=true`, the injected script runs on page load inside the nonce script element, bypassing the Content Security Policy.

---

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