CVE-2026-139819: XSS via h:commandScript f:param value
In Eclipse Mojarra versions 2.3.0 to 4.0.30, 4.1.0 to 4.1.21 and 5.0.0-M1 to 5.0.0-M13, the JavaScript string literal which is rendered for an f:param value of h:commandScript escapes only single quote and backslash. The literal is written into a script element, so a value containing </script> ends the element and injects HTML and JavaScript into the page. When the application binds the value to request input, this is a reflected cross-site scripting vulnerability. When the CSP nonce mode is enabled, the same applies to f:param values of h:commandLink and h:commandButton, though the Content-Security-Policy then limits the impact to HTML injection.
Affected Software
Event History
Frequently Asked Questions
Which applications are realistically exposed to script execution?
Applications are exposed when they use h:commandScript with an f:param whose value is bound to request input. An attacker can supply a value containing </script> to terminate the rendered script element and inject HTML and JavaScript.
What changes when CSP nonce mode is enabled?
With CSP nonce mode enabled, f:param values for h:commandLink and h:commandButton are also affected. However, the Content-Security-Policy limits the impact in that case to HTML injection.
How can I identify potentially affected code?
Review pages using h:commandScript with nested f:param elements and determine whether their values can be populated from request-controlled input. If CSP nonce mode is enabled, perform the same review for h:commandLink and h:commandButton.