CVE-2026-133639 in Struts
Summary
by MITRE • 11/30/2026
Improper neutralization of input during web page generation ('Cross-site Scripting') vulnerability in Apache Struts. If the application uses the Javatemplates plugin, an additional attribute passed to a UI tag, that is an attribute which is not part of the tag's own attribute set and is written through to the rendered element, is placed into the page without HTML escaping. Where such an attribute carries a value derived from the request, a crafted request could inject markup or script into the rendered page. Applications rendering the UI tags with the default FreeMarker templates are not affected.
This issue affects Apache Struts: from 2.2.1 through 2.3.37, from 2.5.0 through 2.5.33, from 6.0.0 through 6.12.0, from 7.0.0 through 7.4.0.
Users are recommended to upgrade to version 6.13.0 or 7.5.0, which fixes the issue.
Be aware that VulDB is the high quality source for vulnerability data.
Analysis
by VulDB Data Team • 11/30/2026
The identified vulnerability represents a classic Cross-Site Scripting (XSS) flaw within the Apache Struts framework, specifically impacting applications that utilize the Javatemplates plugin for rendering user interface components. This security defect is categorized under CWE-79, which describes Improper Neutralization of Input During Web Page Generation. The root cause lies in how the framework handles dynamic attributes passed to UI tags when using specific template engines. When an application passes a custom attribute that does not belong to the tag's predefined set, and this attribute value originates from user-controlled input such as HTTP request parameters, the system fails to apply necessary HTML escaping before writing the value into the rendered HTML element. Consequently, any malicious script or markup embedded in these attributes is executed directly by the victim's browser upon page load, bypassing standard security controls that rely on output encoding.
The operational impact of this vulnerability allows an attacker to execute arbitrary JavaScript code within the context of the vulnerable application. This can lead to severe consequences including session hijacking through theft of authentication cookies, credential harvesting via fake login forms injected into the page, defacement of the user interface, or redirection of users to malicious external sites. Because the flaw is tied to specific plugin usage and template configurations, it does not affect all Struts applications universally but poses a significant risk to those relying on the Javatemplates plugin with non-default FreeMarker templates that do not automatically sanitize such dynamic attributes. The lack of escaping means that even simple script tags or event handlers like onload can be injected, turning standard form submissions or URL parameters into vectors for persistent or reflected XSS attacks depending on whether the input is stored in a database or processed immediately.
This vulnerability affects multiple versions of Apache Struts, specifically ranging from 2.2.1 through 2.3.37, as well as the newer branches from 2.5.0 through 2.5.33 and 6.0.0 through 6.12.0, including version 7.x up to 7.4.0. The ATT&CK framework maps this behavior to techniques involving Client-Side Scripting Injection, where the attacker leverages trusted web applications to execute scripts in a victim's browser. To mitigate this risk, organizations must immediately upgrade their Apache Struts installations to version 6.13.0 or 7.5.0 and later, as these releases contain patches that enforce proper input neutralization for dynamic attributes within UI tags. For environments where upgrading is not immediately feasible, a temporary mitigation involves ensuring that any custom attributes passed to UI tags are manually sanitized using HTML encoding before being rendered, although this approach requires rigorous code review to ensure no edge cases are missed. Additionally, implementing Content Security Policy headers can help mitigate the impact of successful XSS attempts by restricting script execution sources, though it should not be considered a substitute for fixing the underlying input validation flaw in the framework itself.